Embedded debug commands in a source file
First Claim
1. In a computer system, a method for automatically generating a debugger command file having debug commands for execution during source code simulation comprising the steps of:
- (1) embedding at least one debug command in at least one line of a source program;
(2) assembling said source program, said assembling step including;
(a) extracting said embedded debug commands,(b) generating a break-point command associated with each of said embedded debug commands,(c) creating said command file by writing said break-point commands and associated debug commands into said command file, and(d) generating an object code from said source program; and
(3) upon modification of said source program, removing said break point commands and associated embedded debug commands from said command file so that during re-assembly of said modified source program, a new command file is automatically created containing new break point commands associated with said embedded debug commands at their new respective locations in said source program.
0 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for re-generating debug commands is provided comprising a source program having embedded debug commands in a first distinguishable field, and an assembler. The assembler operates on the source code extracting the embedded debug commands and associated address information from the source code while generating object code. The debug commands are stored in a command file for use during simulation. A simulator executes the assembled object code in conjunction with a debugger which executes the stored debug commands as designated during the execution cycle. Upon the termination of a simulation run and the subsequent modification of the source program, the debug commands are automatically re-generated with correct addresses as determined during the subsequent assembly. When the edited source file is loaded, the break-points are cleared and a new command file is executed to insure that the break-points are relocated to the correct source lines. The execution of the embedded debug commands can be enabled or disabled by means of a command line option, so when the debugging is complete, the debug information will not be outputted.
68 Citations
6 Claims
-
1. In a computer system, a method for automatically generating a debugger command file having debug commands for execution during source code simulation comprising the steps of:
-
(1) embedding at least one debug command in at least one line of a source program; (2) assembling said source program, said assembling step including; (a) extracting said embedded debug commands, (b) generating a break-point command associated with each of said embedded debug commands, (c) creating said command file by writing said break-point commands and associated debug commands into said command file, and (d) generating an object code from said source program; and (3) upon modification of said source program, removing said break point commands and associated embedded debug commands from said command file so that during re-assembly of said modified source program, a new command file is automatically created containing new break point commands associated with said embedded debug commands at their new respective locations in said source program.
-
-
2. An apparatus for automatic regeneration of break-points in a debugger command file for execution in conjunction with a simulation of a source program comprising:
-
a source program with at least one embedded debug command; an assembler, said assembler including a decoder for extracting said embedded debug commands from said source program, an object file generator for assembling said source program into object code, a debug command file generator for creating a debug command file including said embedded debug commands extracted by said decoder and break-point commands associated with said extracted embedded debug commands; and a debugger for executing said break point commands and said embedded debug commands in said debug command file during said simulation of said source program; such that said break-point commands and embedded debug commands are automatically re-generated after a modification is made to said source program by the subsequent re-assembly of said source program prior to simulation execution. - View Dependent Claims (3, 4, 5, 6)
-
Specification