Browse Prior Art Database

Generation of Line Table Entries including Sub-Object Symbol Annotations during Code Generation

IP.com Disclosure Number: IPCOM000192874D
Original Publication Date: 2010-Feb-05
Included in the Prior Art Database: 2010-Feb-05
Document File: 2 page(s) / 66K

Publishing Venue

IBM

Abstract

A method and system for generating line table entries including additional annotations on possible sub-object symbols being constructed, destructed or manipulated. The additional annotations allow debuggers, core dump analyzers, profilers or any other tools to perform elaborate analysis of a code.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 57% of the total text.

Page 1 of 2

Generation of Line Table Entries including Sub -Object Symbol Annotations during Code Generation

Disclosed is a method and system for generating line table entries including additional annotations during code generation for inline-ing and sub-object manipulations. A line table entry in a line table indicates a line of a code or a code fragment and a range of program counter (PC) values associated with the line. The additional annotations include possible sub-objects symbols being constructed, destructed or manipulated. Consider the following C++ code fragment "example.cpp" shown in Table 1:-

Line # File example.cpp

x -->

y -->

z -->

class A { public:

 A ();
};

A::A () {

 // …
}
class B { public:

A m

_

   a1; inline B () : {

// …

}
};
class C : public B { public:

A m

a2;

A m

_

_a3;

 C ();
};

C::C () {

 // …
}
int main () {

C c; return 0; }

Table 1

In "example.cpp" shown in Table 1, A::A is called thrice for each C::C i.e., once each for C::B::m

                    a3. Typically, compilers may generate blocks of instructions for a single source line of "example.cpp". For example, a single source line "C::C () {" corresponding to a line "y" in "example.cpp" may execute a block of instructions to perform the operation of the line "y".

This block of instructions is annotated with a single line number "y" and a range of PC values associated with the block of instructions. The single line number "y" and the

_

a1, C::m

_

a2 and C::m

_

1

Page 2 of 2

range of PC values correspond to...