This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/13590] always display addresses in "info var" output
- From: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 11 Jan 2012 20:51:39 +0000
- Subject: [Bug symtab/13590] always display addresses in "info var" output
- Auto-submitted: auto-generated
- References: <bug-13590-4717@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13590
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppluzhnikov at google dot
| |com
--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-01-11 20:51:39 UTC ---
I don't believe dje provided a sufficiently motivating example.
Consider:
foo.h
typedef struct foo { int x; } foo_t;
foo.c
#include "foo.h"
static foo_t foo;
...
bar.c
#include "foo.h"
static foo_t foo;
...
When the two files above are linked together, and "-g" is in effect, how can I
set a watchpoint on one or the other?
(gdb) info var foo
All variables matching regular expression "foo":
File foo.c:
static foo_t foo;
File bar.c:
static foo_t foo;
(gdb) p &foo
$2 = (foo_t *) 0x601028 <<< which one is this?
(gdb) p &foo.c::foo <<< is there a syntax for that?
A syntax error in expression, near `::foo'.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.