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]

Re: Complex DWARF expressions


On Mon, 22 Sep 2014 21:06:30 +0200, Eli Zaretskii wrote:
> Are you saying that whenever GDB can successfully interpret this
> information and extract a value, it simply shows that value?

Yes.


> If so, I think we should add to the DWARF gobbledygook a note to the effect
> that GDB wasn't able to glean the value from that info, and maybe even say
> why (like what info was missing to interpret that).
+
> We should say explicitly that GDB is unable to decypher the data,
> otherwise what we show the user looks like a teaser.

I find the current behavior the right one myself.  There is "info addr"
exactly for the cases of debugging GDB/GCC and/or disassembling inferior code
trying to extract as much information from the crashed state as possible.
Sure feel free to propose any UI changes for GDB.

Maybe "set debug entry-values" could be placed under more user
friendly "info ..." command but then its output would have to be improved from
the current set of scattered debug messages to something more formatted.


> If the computation is expensive, we could have an option to enable it.
> There are situations in debugging when you'd kill to know the value of
> some key variable, I'm sure you know this.

There is no reduction of reported info just to save some GDB computations.
GDB reports all it can.

In general lacking debug info is usually GCC's defect and not GDB's.


> And btw, how did you get the information you showed, like this:
> 
> >  <8><1663ca>: Abbrev Number: 24 (DW_TAG_GNU_call_site)
> >     <1663cb>   DW_AT_low_pc      : 0x814d44f
> >     <1663cf>   DW_AT_abstract_origin: <0x15e7bc>
> >  <9><1663d8>: Abbrev Number: 3 (DW_TAG_GNU_call_site_parameter)
> >     <1663d9>   DW_AT_location    : 1 byte block: 52     (DW_OP_reg2 (edx))
> >     <1663db>   DW_AT_GNU_call_site_value: 1 byte block: 30      (DW_OP_lit0)
> 
> Can GDB show it (and if so, by which command), or is this from objdump
> or some such?

I use "readelf -wi" myself, this is equivalent to "objdump -Wi" for non-ELF
DWARF files.  There is also "eu-readelf -winfo" with slightly different output
formatting.


Jan


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