Method and system for debugging through supervisory operating codes and self modifying codes
First Claim
1. In a system comprising a host computer deploying a debugger and an in-circuit emulator coupled to said host computer wherein said in-circuit emulator is further coupled to a device, a method for debugging said device, said method comprising:
- upon said device and said in-circuit emulator executing program code in lock-step fashion, intercepting an operation prior to its execution;
flagging a code with a marker corresponding to said operation to render said operation detectable prior to executing said code;
upon executing said code, detecting said operation and halting said in-circuit emulator;
executing said operation in said device;
querying said device as to its internal state; and
in response to said querying, updating an internal state of said in-circuit emulator to match said internal state of said device.
5 Assignments
0 Petitions
Accused Products
Abstract
Embodiments of the present invention effectuate a method and system for debugging a device such as a microcontroller in a distributed architectural scheme, where the device may operate at speeds much faster than the debugger program is run, with limited debugging resources physically incorporated into the device itself, and with relatively limited computational capacity, vis-à-vis the platform deploying the debugging software. The embodiments place relatively modest, uncomplicated demands on the debugger software, and the ICE may also be relatively simple. Further, debugging methods and systems according to these embodiments are flexible and adaptable to a variety of different devices that must undergo debugging, yet remain effective, simple, and inexpensive.
-
Citations
23 Claims
-
1. In a system comprising a host computer deploying a debugger and an in-circuit emulator coupled to said host computer wherein said in-circuit emulator is further coupled to a device, a method for debugging said device, said method comprising:
-
upon said device and said in-circuit emulator executing program code in lock-step fashion, intercepting an operation prior to its execution; flagging a code with a marker corresponding to said operation to render said operation detectable prior to executing said code; upon executing said code, detecting said operation and halting said in-circuit emulator; executing said operation in said device; querying said device as to its internal state; and in response to said querying, updating an internal state of said in-circuit emulator to match said internal state of said device. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. In a debugging system comprising a host computer deploying a debugger program and an in-circuit emulator coupled to said host computer and wherein said in-circuit emulator is coupled to a device, a method for debugging said device, said method comprising:
-
upon said device and said in-circuit emulator executing program code in lock-step fashion, scanning a code for an operation prior to executing said code; setting a break point in said code corresponding to said operation prior to executing said code; upon executing said code, detecting said operation and implementing said corresponding break point; executing said operation in said device; querying said device as to its internal state; and in response to said querying, updating an internal state of said in-circuit emulator to match said internal state of said device. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A debugger system comprising:
-
a host computer system for scanning a program code for special operations and for inserting a breakpoint into said program code for each special operation detected; an in-circuit emulator coupled to said host computer system and for executing said program code, wherein said in-circuit emulator halts execution upon reaching a breakpoint associated with a special operation, and wherein said in-circuit emulator signals said host computer system that said breakpoint has been reached; and a device coupled to said in-circuit emulator and for executing said program code in lock-step fashion, absent a breakpoint and wherein said device, in response to said special operation, executes a special program and signals completion to said in-circuit emulator which, in response thereto, queries said device and updates an internal state of said in-circuit emulator to match a current internal state of said device.
-
-
14. In a system comprising a host computer deploying a debugger and an in-circuit emulator coupled to said host computer wherein said in-circuit emulator is further coupled to a device, a method for debugging said device, said method comprising:
-
upon executing a user code, detecting a supervisory operation of said device wherein said supervisory operation selectively modifies said user code; executing said supervisory operation in said device; and parsing said user code, wherein said parsing comprises; querying said device as to an update thereto, said update corresponding to said supervisory operation; detecting a newly promulgated supervisory operation; and in response to said detecting a newly promulgated supervisory operation, updating said device, said host computer and said in-circuit emulator, wherein an internal state of said in-circuit emulator is updated to match an internal state thereof corresponding to said update thereto corresponding to said supervisory operation. - View Dependent Claims (15, 16, 17, 18)
-
-
19. A debugging system comprising a host computer deploying a debugger program and an in-circuit emulator coupled to said host computer wherein said in-circuit emulator is coupled to a device and wherein said system performs a method for debugging said device, said method comprising:
-
upon running a user code wherein said device and said in-circuit emulator execute user code in lock-step fashion, detecting a supervisory operation of said device wherein said supervisory operation selectively modifies said user code; executing said supervisory operation in said device; and parsing said user code, wherein said parsing comprises; querying said device as to a component updated with said supervisory operation; detecting a newly promulgated supervisory operation; and in response to said detecting a newly promulgated supervisory operation, updating said device, said host computer and said in-circuit emulator, wherein an internal state of said in-circuit emulator is updated to match an internal state thereof corresponding to said component updated with said supervisory operation. - View Dependent Claims (20, 21, 22, 23)
-
Specification