GDB, dwarf1, and static variables in .so's

Graeme Peterson gp@qnx.com
Mon Nov 5 04:24:00 GMT 2001


Hi, all.

I have observed an odd behavior in GDB 5.0 under both QNX6 and 
Solaris 2.8.

Any static variables declared in shared objects are not printable from
within GDB.  Static variables (local to a function, or global) seem not
to have the relocations applied to them in the symbol table.

This only happens if the shared object is compiled with Dwarf Version-1,
(level 1 or 2).  The debug format of the main() object does not matter.

If the shared object is compiled using dwarf2 or stabs, all is well.

I am investigating whether this is a shortcoming of the Dwarf-1 format,
or a gcc/gdb implementation bug.

Has anyone else observed this?  Comments?

Thanks.
Graeme Peterson.

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list