This is the mail archive of the gdb@sources.redhat.com 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]

Re: cannot subscript something of type <data variable, no debug info>


Another note on this issue:

I again tried merging tester.h into the source file and compling.  In this
case, objdump *still* says no symbol information found, but gdb works as
expected:

(gdb) p Mod[0]
$1 = {Stat = 0, sys_status = 0, powered_up = 0, compat = 0}
(gdb) p (S_Module) Mod[0]
$2 = {Stat = 0, sys_status = 0, powered_up = 0, compat = 0}
(gdb) p Mod[0].powered_up
$3 = 0
(gdb) b main
Breakpoint 1 at 0x804847c: file tester2.cpp, line 16.
(gdb) r
Starting program: /home/usbsrc/files/tester

Breakpoint 1, main () at tester2.cpp:16
16         Mod[0].powered_up = 1 ;
(gdb) n
18         printf("powered_up=%u\n", Mod[0].powered_up) ;
(gdb) p Mod[0].powered_up
$4 = 1

... as expected.  Is gdb perhaps not able to find the header file(s) for
some reason??  And am I simply using objdump wrong?

    Dan


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