Data processing: software development – installation – and managem – Software program development tool – Testing or debugging
Reexamination Certificate
1999-05-12
2002-05-28
Dam, Tuan Q. (Department: 2122)
Data processing: software development, installation, and managem
Software program development tool
Testing or debugging
C717S158000, C711S138000, C711S139000
Reexamination Certificate
active
06397382
ABSTRACT:
BACKGROUND OF THE INVENTION
1. Field of the Invention
This invention relates to software analysis, and more particularly to a method and apparatus for dynamically instrumenting software executing on embedded systems for analysis thereof.
2. Background Information
A wide variety of hardware and/or software systems for generating an exception to debug, test and/or emulate a target processor are known in the art. Such systems provide their functionality using many disparate technologies.
For example, U.S. Pat. No. 5,560,036 to Yoshida; U.S. Pat. No. 5,737,516 to Circello et al.; U.S. Pat. No. 5,530,804 to Edgington et al., (the '804 patent); and U.S. Pat. No. 5,493,664 to Doi, all disclose processors having hardware or software integrated therein which facilitates debugging. A drawback of these approaches, however, is that they are not readily usable in connection with processors not originally manufactured with integrated debugging capabilities. For example, The '804 patent discloses a processor having two modes of operation, one being a normal mode and the other being a debug, test or emulator mode of operation which is entered via an exception/interrupt. In this approach, a “generate debug mode exception” (GDMI) may be included in the processor's instruction set. Disadvantageously, this approach is integrated into the processor rather than being suitable for use with processors not originally manufactured with such integrated systems.
U.S. Pat. No. 5,748,878 to Rees et al., (the '878 patent) discloses a software analysis system for capturing tags generated by tag statements in instrumented source code. This software analysis system includes a probe that monitors the address and data bus of the target system. When a tag statement is executed in the target system, a tag is written to a predetermined location in the address space of the target system. In this manner, instructions executing from internal cache memory which are not reflected on externally accessible buses, may be monitored. A drawback of this approach, however, is that discrete tag statements, which tend to disadvantageously increase the number of executable lines of the code, must be included within the source code. These discrete tags disadvantageously increase the size of the code in proportion to the number of functions instrumented. Moreover, although the tags may be monitored, the code continues to be executed within cache, and thus is not directly observable.
Thus, a need exists for an improved debugging/emulation system capable of overcoming the drawbacks of the prior art.
SUMMARY OF THE INVENTION
According to an embodiment of this invention, a method for monitoring software code being executed in a target system having a bus and cache, includes the steps of:
(a) searching a range of addresses within the software code to identify a desired instruction;
(b) replacing the desired instruction with an exception-generating instruction;
(c) inserting an exception routine into an exception vector table, the exception routine having a cache-disabling instruction and a branch instruction branching to an address of the software code subsequent to the exception-generating instruction; and
(d) executing the software code.
In a second aspect of the present invention, a method for monitoring software code being executed in a target system having a bus and cache includes the steps of:
(a) searching a range of addresses within the software code to identify preamble and postamble instructions;
(b) replacing the preamble instruction with a misalignment instruction;
(c) replacing the postamble instruction with an other misalignment instruction;
(d) inserting an exception routine into an exception vector table executable upon a branch from a faulted address, the exception routine having a cache-disabling instruction, an instruction to execute the instruction replaced from the faulted address, a branch instruction branching to an address of the software code subsequent to the faulted address, and a decoding instruction to indicate entry of a function when the address of the misalignment instruction is faulted and to indicate exit of a function when the address of the other misalignment instruction is faulted; and
(e) executing the software code, wherein at least a portion of the software code will execute externally of the cache.
In a third aspect of the present invention, a system is provided for monitoring software code being executed in a target having a bus and cache. The system includes an instruction locating module which searches a range of addresses within the software code to identify a desired instruction, and an instruction replacement module which replaces the desired instruction with an exception-generating instruction. The system also includes a vector table instrumentation module which inserts an exception routine into an exception vector table, the exception routine having a cache-disabling instruction and a branch instruction branching to an address of the software code located subsequent to the exception-generating instruction.
The above and other features and advantages of this invention will be more readily apparent from a reading of the following detailed description of various aspects of the invention taken in conjunction with the accompanying drawings.
REFERENCES:
patent: 5030959 (1991-07-01), Hayden
patent: 5182811 (1993-01-01), Sakamura
patent: 5212794 (1993-05-01), Pettis et al.
patent: 5313608 (1994-05-01), Takai
patent: 5363497 (1994-11-01), Baker et al.
patent: 5493664 (1996-02-01), Doi
patent: 5530804 (1996-06-01), Edgington et al.
patent: 5537536 (1996-07-01), Groves
patent: 5560036 (1996-09-01), Yoshida
patent: 5561761 (1996-10-01), Hicok et al.
patent: 5581695 (1996-12-01), Knoke et al.
patent: 5654962 (1997-08-01), Rostoker et al.
patent: 5710724 (1998-01-01), Burrows
patent: 5737516 (1998-04-01), Circello et al.
patent: 5748878 (1998-05-01), Rees et al.
patent: 5751942 (1998-05-01), Christensen et al.
patent: 5768500 (1998-06-01), Agrawal et al.
patent: 5850562 (1998-12-01), Crump et al.
patent: 5894575 (1999-04-01), Levine et al.
patent: 5896538 (1999-04-01), Blandy et al.
patent: 5900014 (1999-05-01), Bennett
patent: 5940618 (1999-08-01), Blandy et al.
patent: 5943498 (1999-08-01), Yano et al.
patent: 5960198 (1999-09-01), Roediger et al.
patent: 5963543 (1999-10-01), Rostoker et al.
patent: 6009270 (1999-12-01), Mann
patent: 6041406 (2000-03-01), Mann
patent: 6119206 (2000-09-01), Tatkar et al.
patent: 6142683 (2000-11-01), Madduri
patent: 6145122 (2000-11-01), Miller et al.
patent: 6145123 (2000-11-01), Torrey et al.
patent: 6185732 (2001-02-01), Mann et al.
patent: 6189141 (2001-02-01), Benitez et al.
patent: 6223338 (2001-04-01), Smolders
IBM Technical Bulletin, vol. 31 No. 1 Jun. 1988, Dual Indirect RAM/ROM JUMP Tables for Firmware Updates, pp. 294-298.*
IBM Technical Bulletin, vol. 39. No. 6, Jun. 1996, Transition Records for Tracing Program Flows.*
Microsift Press, Computer Dictionary second edition, pp. 218-219, interlacing and interleaving terms.
D'Arienzo Felix
Dam Tuan Q.
Ingberg Todd
Palmieri Joseph
Sampson & Associates P.C.
LandOfFree
Dynamic software code instrumentation with cache disabling... does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Dynamic software code instrumentation with cache disabling..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Dynamic software code instrumentation with cache disabling... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-2830019