This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug exp/11927] New: looking up structure members as symtabs?
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 18 Aug 2010 21:02:13 -0000
- Subject: [Bug exp/11927] New: looking up structure members as symtabs?
- Reply-to: sourceware-bugzilla at sourceware dot org
When parsing "p mybar.foo" gdb will do a global lookup of symbol "foo".
That seems a tad clumsy.
The bug, though, is that gdb may also try to lookup "foo" as a symtab.
play$ cat foo
/* Copy this to file "foo" and compile as
gcc -g -x c foo -o foo.x
*/
struct bar
{
int foo;
};
struct bar mybar;
int
main ()
{
return 0;
}
play$ gcc -g -x c foo -o foo.x
play$ build/obj64/gdb/gdb foo.x
GNU gdb (GDB) 7.2.50.20100817-cvs
[...]
Reading symbols from /home/dje/src/play/foo.x...done.
(gdb) start
Temporary breakpoint 1 at 0x40044c: file foo, line 15.
Starting program: /home/dje/src/play/foo.x
Temporary breakpoint 1, main () at foo:15
15 return 0;
(gdb) p mybar.foo
A syntax error in expression, near `foo'.
(gdb)
--
Summary: looking up structure members as symtabs?
Product: gdb
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: exp
AssignedTo: unassigned at sourceware dot org
ReportedBy: dje at google dot com
CC: gdb-prs at sourceware dot org
GCC host triplet: amd64-linux
http://sourceware.org/bugzilla/show_bug.cgi?id=11927
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.