US 7,401,323 B2
Just-My-Code debugging
Jonathon Michael Stall, Bothell, Wash. (US); and Michael M. Magruder, Sammamish, Wash. (US)
Assigned to Microsoft Corporation, Redmond, Wash. (US)
Filed on Apr. 21, 2003, as Appl. No. 10/419,384.
Prior Publication US 2004/0210876 A1, Oct. 21, 2004
Int. Cl. G06F 9/44 (2006.01)
U.S. Cl. 717—130  [717/124; 717/127; 717/129] 33 Claims
OG exemplary drawing
 
11. A method for Just-My-Code (JMC) debugging, the method comprising:
automatically identifying a set of programming constructs representing interesting code by comparing an assembly to an interesting code list, whereby the set differentiates portions of the assembly that are interesting from those portions that are uninteresting;
automatically inserting flags debugging probes into respective programming constructs representing interesting code, the debugging probes being inserted during computer-program compiling operations to generate native code by parsing the interesting code list generated by the debugger, wherein the debugging probes reference an associated flag via a compile-time constant pointer value to determine whether to request the debugging service, the debugging probe represented by:
if(*pFlag){call JMC Probe}
wherein pFlag is a compile-time constant pointer to the associated flag, * indicates an address is to be de-referenced at run-time to yield value of the associated flag and “JMC Probe” is a call to a JMC Probe function;
executing the native code as a process, the process comprising one or more threads of execution that run-free through uninteresting code during a JMC step operation, a thread of the one or more threads only being halted in the interesting code when an active one of the debugging probes is encountered by the thread while the thread is JMC stepping through the process; and
wherein JMC stepping comprises a JMC step-in, a JMC step-out, or a JMC step-over operation.