发明名称 |
Intermediate language representation and modification |
摘要 |
A system and method for facilitating analysis and modification of a computer program. A directed graph is generated from an intermediate language representation of a computer program function, with a node representing each instruction. Meta-edges or meta-nodes are inserted into the directed graph to facilitate location of instruction nodes. One type of meta-edge is a back edge that identifies branch instruction nodes. Some meta-nodes may identify instructions of a specific type. Some meta-nodes may identify exception blocks and corresponding handlers. Analysis of a program function may include insertion of new instructions prior to execution of the function. |
申请公布号 |
US8875111(B2) |
申请公布日期 |
2014.10.28 |
申请号 |
US200912428489 |
申请日期 |
2009.04.23 |
申请人 |
Microsoft Corporation |
发明人 |
Dubinsky Leon;Lyon-Smith John |
分类号 |
G06F9/45;G06F9/455;G06F9/44;G06F11/36 |
主分类号 |
G06F9/45 |
代理机构 |
|
代理人 |
Sullivan Kevin;Drakos Kate;Minhas Micky |
主权项 |
1. A computer-implemented method for modifying execution of a computer program function having a plurality of instructions, comprising:
a) in response to detecting an invocation of the computer program function, generating a directed graph representing the computer program function, the directed graph including a plurality of instruction nodes, each instruction node representing a corresponding instruction of the plurality of instructions; b) inserting, into the directed graph, one or more meta-nodes, the one or more meta-nodes including a first edge to an instruction node of the directed graph corresponding to an instruction of an exception block and a second edge to an instruction node of the directed graph corresponding to a handler associated with the exception block; and c) employing the one or more meta-nodes to perform at least one of adding or removing at least one other instruction node to the directed graph; and d) translating the directed graph to an intermediate language representation of the computer program function. |
地址 |
Redmond WA US |