DWARF2 Debugging Information

Show-Chung Chu scchu@us.ibm.com
Thu Jan 2 21:33:00 GMT 2003





Hi,

I am trying to test C++ static class variable,  inherited class, and
DWARF2 debugging information. I made a very simple/short programs for
testing purpose.

My compiler version is 3.0.4, and thread model is vxworks.

I had two classes, one is base class named "parent", and the other one is
derived from the base class named "Son".

I followed the VxWorks manual to do all the necessary work to invoke the
constructor of the static variables, and it worked just as  I expected.

The problem I had was if the base class was invoked from the main(), the
constructor of the base  class will run, but it sounded that  the local
variable did not provided the DW_AT_location debugging information, so the
variable never got right updated. (This is happened in parent.c, the local
variable is "i")

All the source file, header file, dump output file, and the ELF DWARF2
image are attached below.

(See attached file: testdwarf2.gcc)(See attached file: son.h)(See attached
file: parent.h)

(See attached file: test2.c)(See attached file: parent.c)(See attached
file: son.c)(See attached file: test.c)(See attached file: test1.c)(See
attached file: __testdwarf2.gcccd.c)

Thank for your help.

S. C. Chu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testdwarf2.gcc
Type: application/octet-stream
Size: 25902 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030102/f6a52345/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: son.h
Type: application/octet-stream
Size: 213 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030102/f6a52345/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parent.h
Type: application/octet-stream
Size: 230 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030102/f6a52345/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.c
Type: application/octet-stream
Size: 305 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030102/f6a52345/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parent.c
Type: application/octet-stream
Size: 191 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030102/f6a52345/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: son.c
Type: application/octet-stream
Size: 188 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030102/f6a52345/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: application/octet-stream
Size: 296 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030102/f6a52345/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.c
Type: application/octet-stream
Size: 305 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030102/f6a52345/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: __testdwarf2.gcccd.c
Type: application/octet-stream
Size: 419 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030102/f6a52345/attachment-0008.obj>


More information about the Gcc-help mailing list