This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem printing global variables in a shared library


Hi,

I am using gdb 6.5 to debug programs on linux 2.6.14-7, PQ3(MPC8555E) processor.

The global variables(initialized) in a shared library are printed
incorrectly(junk) by gdb print command.
Printing the same variables from program being debugged using printf,
displays the correct value.
The same problem is noticed while printing values of "errno" global variable.

If the global variable in shared library is declared as a static type,
it is displayed correctly by gdb.
Code optimization is turned off while debugging. No problems with
global variables in an executable.
Problem is seen during remote debugging(with gdbserver) as well as
during direct debugging on target with gdb.

Please help. Any clues on what could i be doing wrong ?

Thanks,
Rajeev


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]