Dynamic instrumentation method and apparatus for tracing and analyzing a program
First Claim
1. A computer implemented method of dynamically analyzing a program, the computer implemented method causing the computer to execute steps comprising:
- storing an environment value before an execution of a function of a main page by storing a first instruction of the function in a temporary page before execution of the first instruction, inserting a break instruction of the main page at an address of the first instruction in the main page, and executing the break instruction of the main page; and
storing the environment value after the execution of the function by executing a break instruction of the temporary page in a return address of the temporary page after a final instruction of the function is executed;
executing the break instruction of the main page, storing the environment value before execution of the function, and changing a return address of the function to an address of the first function in the temporary page.
1 Assignment
0 Petitions
Accused Products
Abstract
An apparatus and method for dynamically analyzing a program are provided. The apparatus and method help minimize overhead in tracing the execution of the program without substantially affecting the operation of the program at run time. The method includes storing an environment value before execution of a function of a main page by storing a first instruction of the function in a temporary page before execution of the first instruction. The method also includes inserting a break instruction at an address of the first instruction in the main page, executing the break instruction, and storing an environment value after execution of the function by executing a break instruction of the temporary page.
23 Citations
17 Claims
-
1. A computer implemented method of dynamically analyzing a program, the computer implemented method causing the computer to execute steps comprising:
-
storing an environment value before an execution of a function of a main page by storing a first instruction of the function in a temporary page before execution of the first instruction, inserting a break instruction of the main page at an address of the first instruction in the main page, and executing the break instruction of the main page; and storing the environment value after the execution of the function by executing a break instruction of the temporary page in a return address of the temporary page after a final instruction of the function is executed; executing the break instruction of the main page, storing the environment value before execution of the function, and changing a return address of the function to an address of the first function in the temporary page. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A hardware apparatus for dynamically analyzing a program, the apparatus comprising:
-
an instruction managing unit configured to store instructions of a function of a main page in a temporary page, and to insert a break instruction in the temporary page; and a probe unit configured to detect an environment value of the function according to an execution of the break instruction of the temporary page, and to store the detected environment value; executing the break instruction of the main page, storing the environment value before execution of the function, and changing a return address of the function to an address of the first function in the temporary page. - View Dependent Claims (10, 11, 12, 13)
-
-
14. A computer implemented method of dynamically analyzing a program, the computer implemented method causing the computer to execute steps comprising:
-
determining a first environment value; copying a first function instruction from a first address, the first address located in a main page; storing the first function instruction in a second address, the second address located in a temporary page; storing a first break instruction in the first address, in place of the first function instruction; executing the first break instruction in the first address; executing the first function instruction in the second address; executing a second break instruction; and determining a second environment value, wherein the second break instruction is stored in an address that follows the second address. - View Dependent Claims (15, 16, 17)
-
Specification