Method, apparatus and article for generation of debugging information
AssigneeSTMicroelectronics S.r.l.
InventorsAntony Bowers, Richard Shann
Life of this patent
Estimating the term…
Abstract
Call frame information is used by debugging software. It records how to restore the parent stack frame at any point during execution of a program. It is normally generated during compilation and stored in the executable in a compressed format, consisting of sequences of instructions that describe how the current call frame changes during execution of each function. Described herein is a means of generating call frame information at link time, using linker macro calls generated by a small set of assembler macros.
Claims20
A method of linking a plurality of object code modules to form an executable program, each object code module comprising sets of section data and associated section data relocation instructions, at least one of said modules further comprising a macro section containing information sequences associated with one or more of said sets of section data and macro relocation instructions associated with said macro section, wherein said information sequences include call frame information macros from which a sequence of call frame information instructions are derivable as a modified information sequence for constructing a debug frame of said executable program, and wherein said section data relocation instructions include at least one divert macro call relocation instruction identifying a location of one of said information sequences in said macro section, the method comprising, at link time:
- reading said sets of section data and section data relocation instructions;
- executing said relocation instructions on said associated sets of section data to modify said section data to generate program code sequences and inserting said program code sequences into a first portion of said executable program, wherein said method further comprises:
- on reading a divert macro call relocation instruction identifying the location of said information sequence in the macro section, executing said associated macro relocation instructions on said associated information sequence to modify said information sequence;
- and
- constructing said debug frame of said executable program with said call frame information macros therein.
A method of generating an object code module for linking with other object code modules to form an executable program, the method comprising:
- generating sets of section data and associated section data relocation instructions;
- generating a macro section containing information sequences associated with one or more of said sets of section data and macro relocation instructions associated with said macro section, including generating at least one divert macro call relocation instruction identifying a location of one of said information sequences in said macro section,
- wherein each information sequence in the macro section constitutes skeleton information for generating a set of call frame information instructions, and
- constructing a debug frame of an executable program at link time with said call frame information instructions therein.
A computing system having a processor for linking a plurality of object code modules to form an executable program, each object code module comprising sets of section data and associated section data relocation instructions, at least one of said modules further comprising a macro section containing information sequences associated with one or more of said sets of section data and macro relocation instructions associated with said macro section, wherein said section data relocation instructions include at least one divert macro call relocation instruction identifying a location of one of said information sequences in said macro section, the linker comprising:
- an instruction reader for reading said sets of section data and section data relocation instructions;
- and
- means for executing said relocation instructions on said associated sets of section data to modify said section data to generate program code sequences and for inserting said program code sequences into a first portion of said executable program,
- wherein said instruction reader comprises means for detecting a divert macro call relocation instruction identifying the location of said information sequence in the macro section, operable to execute said associated macro relocation instructions on said associated information sequence to generate a sequence of call frame instructions;
- and
- constructing a debug frame of said executable program at link time with said call frame instructions therein.
A computer-readable storage medium storing instructions which when executed by a computing system cause the computing system to link a plurality of object code modules to form an executable program, each object code module comprising sets of section data and associated section data relocation instructions, at least one of said modules further comprising a macro section containing information sequences associated with one or more of said sets of section data and macro relocation instructions associated with said macro section, wherein said section data relocation instructions include at least one divert macro call relocation instruction identifying a location of one of said information sequences in said macro section, comprising:
- at link time, reading said sets of section data and section data relocation instructions;
- at link time, executing said relocation instructions on said associated sets of section data to modify said section data to generate program code sequences and inserting said program code sequences into a first portion of said executable program, wherein said method further comprises:
- at link time, on reading a divert macro call relocation instruction identifying the location of said information sequence in the macro section, executing said associated macro relocation instructions on said associated information sequence to modify said information sequence and to generate a sequence of call frame instructions;
- and
- at link time, constructing a debug frame of said executable program with said call frame instructions therein.
Dependencies are inferred from the claim text.