This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: cannot subscript something of type <data variable, no debug info>
Also, I tried a SuSE 9 system with the vendor-supplied gcc and gdb:
Linux spe186 2.6.5-7.97-bigsmp #1 SMP Fri Jul 2 14:21:59 UTC 2004 i686 i686 i386 GNU/Linux
gcc version 3.3.3 (SuSE Linux)
GNU gdb 6.1
This GDB was configured as "i586-suse-linux"
Your test program worked fine for me:
[chastain@spe186 dm]$ gdb tester
GNU gdb 6.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) print Mod[0]
$1 = {Stat = 0, sys_status = 0, powered_up = 0, compat = 0}
(gdb) print (S_Module) Mod[0]
$2 = {Stat = 0, sys_status = 0, powered_up = 0, compat = 0}
Also try this: right after you start gdb, do "break main"
and "run", to get to the main program. Then print Mod[0] et cetera.
Does that help any?