Debugging techniques in a multithreaded environment
First Claim
1. A computer-implemented method for executing a breakpoint instruction without removing the breakpoint instruction from an executing target program, the target program having a multiple software threads each able to execute without halting execution of the other threads, the method comprising:
- executing the target program using a target program thread;
placing a breakpoint at a first location of a first instruction in the target program;
installing an OOL instruction emulation group for the first instruction replaced by the breakpoint in an area of memory different from the first location;
responsive to receiving an indication to assume execution of the target program, executing the OOL instruction emulation group at its installed location; and
subsequent to executing the OOL instruction emulation group, resuming execution of the target program by executing a second instruction at a second location immediately after the first location in the target program.
2 Assignments
0 Petitions
Accused Products
Abstract
A system for debugging targets using various techniques, some of which are particularly useful in a multithread environment. These techniques include implementing breakpoints using out-of-line instruction emulation so that an instruction replaced with a breakpoint instruction does not need to be returned to its original location for single-step execution, executing a debugger nub for each target as part of the target task but using a nub task thread for the nub execution that is separate from the target task threads, providing immunity from breakpoints for specified threads such as the nub thread via specialized breakpoint handlers used by those threads, and virtualizing the debugger nub such that a shared root nub provides a uniform interface between the debugger and the target while specialized nubs provide differing functionality based on the type of target being debugged.
-
Citations
47 Claims
-
1. A computer-implemented method for executing a breakpoint instruction without removing the breakpoint instruction from an executing target program, the target program having a multiple software threads each able to execute without halting execution of the other threads, the method comprising:
-
executing the target program using a target program thread; placing a breakpoint at a first location of a first instruction in the target program; installing an OOL instruction emulation group for the first instruction replaced by the breakpoint in an area of memory different from the first location; responsive to receiving an indication to assume execution of the target program, executing the OOL instruction emulation group at its installed location; and subsequent to executing the OOL instruction emulation group, resuming execution of the target program by executing a second instruction at a second location immediately after the first location in the target program. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computer-implemented method for executing a breakpoint instruction without removing the breakpoint instruction from an executing target program, the target program having a multiple software threads each able to execute without halting execution of the other threads, the method comprising:
-
in an executing target program, receiving a request to add a breakpoint for a first instruction at a first location in the target program; generating an OOL instruction emulation group for the first instruction; installing the OOL instruction emulation group in a free area of memory separate from the first location; saving an indication of the location of the OOL instruction emulation group; and replacing the first instruction with a break instruction. - View Dependent Claims (12, 13)
-
-
14. A computer-readable medium having stored thereon computer instructions that, when executed by a computer, cause the computer to:
-
generate an OOL instruction emulation group for an instruction in an area of memory in an executing target program in a target program thread; install the OOL instruction emulation group in an area of memory different from the area of memory in the executing target program; save an indication of the area of memory in which the OOL instruction emulation group is installed; and replace the instruction in the area of memory in the executing target program with a break instruction. - View Dependent Claims (15, 16, 17, 18, 19)
-
-
20. A computer-readable storage medium containing instructions for executing a breakpoint instruction by a method, the method comprising:
-
executing a target program in a target program thread, the target program having a break instruction at a first location, the break instruction replacing a first instruction formerly located at the first location; providing an OOL instruction emulation group comprising a plurality of instructions including the first instruction, the OOL instruction emulation group operable to execute in a free area of memory separate from the first location; and executing a breakpoint handler operable to interact with a debugger program, the breakpoint handler operable to transfer flow of execution to the OOL instruction group subsequent to interacting with the debugger program. - View Dependent Claims (21, 22, 23, 24, 25, 26)
-
-
27. A computer-implemented method for debugging an executing target program having multiple software threads each able to execute without halting execution of the other threads and having at least one breakpoint set in such a manner that encountering the breakpoint causes a break to occur, the method comprising:
-
executing a first program using a thread of the target program; executing the target program using the other target program threads; when one of the other target program threads encounters one of the set breakpoints during execution of the target program and causes a break to occur, halting execution of the one of the other target program thread until an indication is received from the first program to resume execution; and when the executing first program thread encounters one of the set breakpoints and causes a break to occur, continuing execution of the first program thread without receiving an external indication to continue the execution. - View Dependent Claims (28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47)
-
Specification