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>


Hi Daniel,

You're issuing the right commands, and it looks like a bug,
but I can't reproduce it and I haven't seen this happen before.

I tried this with "tester.cpp" and "tester.h" on my system:

  native i686-pc-linux-gnu, red hat linux 8
  gcc 3.3.4 from ftp.gnu.org
  gdb 6.1 from ftp.gnu.org

Same command line:

  [mec.gnu@berman dm]$ g++-334 -Wall -g tester.cpp -o tester
  [mec.gnu@berman dm]$ gdb-61 tester

And gdb works fine:

  (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}

It's something weird, and something that I haven't seen before.

Can you try this: download gcc 3.3.4 from ftp.gnu.org, build it
(the --prefix option is very helpful), install it, and try that.
Build tester.cpp with:

  g++ -v -Wall -g tester.cpp -o tester

If that still fails, mail me the "tester" executable file,
along with the output of that "g++ -v", and I'll have a look.

Michael Chastain
GDB QA Guy


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