Runtime Code Hooking for Print Driver and Functionality Testing
First Claim
Patent Images
1. A method comprising:
- locating a target function of an application to modify on a computing device, the application compiled to inject place holder instructions as non-operative entry points into each function of the application including the target function;
identifying a hook function to execute instead of the target function when a call is made to the target function; and
overwriting a place holder instruction injected into the target function with a jump instruction to cause execution of the hook function.
3 Assignments
0 Petitions
Accused Products
Abstract
Runtime code hooking techniques are described in which a place holder instruction within a compiled module is used as an entry point to enable code hooking. A hook function to modify a target function is developed. At runtime, the target function to be modified is located. A place holder instruction within the target function is overwritten with instructions to cause execution of the hook function when the target function is called.
5 Citations
20 Claims
-
1. A method comprising:
-
locating a target function of an application to modify on a computing device, the application compiled to inject place holder instructions as non-operative entry points into each function of the application including the target function; identifying a hook function to execute instead of the target function when a call is made to the target function; and overwriting a place holder instruction injected into the target function with a jump instruction to cause execution of the hook function. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method implemented by a computing device comprising:
-
determining a location of a target function of an application to be modified on the computing device, the application including place holder instructions injected as non-operative entry points into each function of the application including the target function and gaps maintained between functions in code for the application; overwriting a place holder instruction of the target function with a jump instruction to jump to one of said gaps to initiate execution of a hook function instead of the target function when the target function is called; and inserting instructions in the one of said gaps sufficient to cause execution of a hook function responsive to execution of the jump instruction to jump to the one of said gaps. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. A system comprising:
-
one or more processing devices; and memory storing; target code; a hook function configured to modify functionality provided by a target function of the target code; and one or more modules stored in the memory and executable via the one or more processing devices to; receive information to identify the hook function and the target function of the target code to modify with the hook function, the target code including place holder instructions injected as non-operative entry points into functions of the target code including at least the target function and at least one gap maintained between functions in the target code; overwrite a place holder instruction of the target function with a first jump instruction to jump to the at least one gap when the target function is called; and insert another jump instruction in the at least one gap sufficient to cause a jump to execute the hook function responsive to execution of the first jump instruction. - View Dependent Claims (17, 18, 19, 20)
-
Specification