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

Re: [rfc] Decode "is a variable with complex or multiple locations" (PR 8399)


> Date: Sun, 20 Sep 2009 22:51:09 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: Roland McGrath <roland@redhat.com>
> 
> the attached patch now prints:
> 
> (gdb) info address val
> Symbol "val" is a variable with multiple locations, for PC inclusive - exclusive:
> 0x5157c9 - 0x5157e9: stored relative to frame base at offset -20 
> 0x5157e9 - 0x5157f2: stored relative to register rsp at offset 60
> 0x5157f2 - 0x515835: stored relative to frame base at offset -20 
> and optimized out in ranges not covered above.

This is a very useful feature, thanks.

> (a) While it does what `info address' should do I think you (+me) wished more
>     just the single line valid for the current PC.
> 
>     This would do `info scope *$pc' but that one prints _all_ the visible
>     variables with no way how to request just one variable.

We could have "info scope *$pc VAR" that does it for a single
variable.

>     As the attached patch mostly just reimplements already available readelf

Does it mean this patch will only work with ELF-based executables, not
with any executable that uses DWARF-2?

>     one should probably change `info address' to print it only for the current
>     PC address.

Yes, I agree.


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