From: "Daniel Miller \(IMI\)" <dan@imi-test.com>
To: "Michael Chastain" <mec.gnu@mindspring.com>, <drow@false.org>
Cc: <gdb@sources.redhat.com>
Subject: Re: cannot subscript something of type <data variable, no debug info>
Date: Mon, 23 Aug 2004 22:30:00 -0000 [thread overview]
Message-ID: <009e01c48959$a5192640$0401a8c0@dan> (raw)
In-Reply-To: <412A616D.nailD4K28EC6E@mindspring.com>
[-- Attachment #1: Type: text/plain, Size: 3052 bytes --]
hmmm... Okay, if you tried SuSE 9 (which is what I'm using, though I've
upgraded the kernel to 2.6.7), and you don't see the same problem, there's
probably no point in me trying to upgrade to 3.3.4, huh?
I tried your 'break main' suggestion, and here's what I get:
$ 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) break main
Breakpoint 1 at 0x8048478: file tester.cpp, line 9.
(gdb) run
Starting program: /home/m7000/m7600/files/tester
Breakpoint 1, main () at tester.cpp:9
9 Mod[0].powered_up = 1 ;
(gdb) p Mod[0]
cannot subscript something of type `<data variable, no debug info>'
(gdb) p (S_Module) Mod[0]
No symbol "S_Module" in current context.
(gdb)
What's interesting is that I can trace past the assignment statement at line
9, and then past the printf statement, and it properly prints out the value
of the variable, but I *still* can't display it!!
Is it possible that upgrading the kernel affected anything?? That seems
unlikely, since building the kernel shouldn't change any of the compiler
libraries, I don't think??
I'm going to go ahead and send you my binary for tester; it's small enough
that there's no reason not to, I don't think. I'll put it in bz2 format...
Dan
----- Original Message -----
From: "Michael Chastain" <mec.gnu@mindspring.com>
To: <drow@false.org>; <dan@imi-test.com>
Cc: <gdb@sources.redhat.com>
Sent: Monday, August 23, 2004 14:28
Subject: 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?
>
>
[-- Attachment #2: tester.bz2 --]
[-- Type: application/octet-stream, Size: 4068 bytes --]
next prev parent reply other threads:[~2004-08-23 22:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-21 1:23 Daniel Miller (IMI)
2004-08-21 2:11 ` Daniel Jacobowitz
2004-08-23 20:49 ` Daniel Miller (IMI)
2004-08-23 21:15 ` Michael Chastain
2004-08-23 21:28 ` Michael Chastain
2004-08-23 22:30 ` Daniel Miller (IMI) [this message]
2004-08-24 2:20 ` Michael Chastain
2004-08-24 12:12 ` Michael Chastain
2004-08-24 16:25 ` Daniel Miller (IMI)
2004-08-24 16:34 ` Daniel Jacobowitz
2004-08-24 16:40 ` Daniel Miller (IMI)
2004-08-24 16:54 ` Michael Chastain
2004-08-24 16:32 ` Daniel Miller (IMI)
2004-08-24 16:54 ` Daniel Miller (IMI)
2004-08-24 16:55 ` Daniel Jacobowitz
2004-08-24 17:20 ` Michael Chastain
2004-08-24 17:48 ` Daniel Miller (IMI)
2004-08-24 17:52 ` Daniel Jacobowitz
[not found] ` <00e001c48a01$014b02b0$0401a8c0@dan>
2004-08-24 17:54 ` Michael Chastain
2004-08-23 20:56 Daniel Miller (IMI)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='009e01c48959$a5192640$0401a8c0@dan' \
--to=dan@imi-test.com \
--cc=drow@false.org \
--cc=gdb@sources.redhat.com \
--cc=mec.gnu@mindspring.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox