This is the mail archive of the gdb@sourceware.org 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]

info addr foo [where foo is a static global in multiple files]


If I want to find the addresses of all variables named foo, it seems
like there should be an easy way to do this.  "info addr foo" will
only print one.  There's also the issue that if I only want one it may
not print the one I want.  Should it print all of them?

The user could study the output of "info var foo" and do things like
"p/x &'file.c'::foo" for each variable, but that seems a bit clumsy
(and doesn't work if the files all happen to have the same name).

[As a workaround, the user could do "maint print symbols", but I
wonder if "info addr" should change.]


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