This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] PR gdb/21226: Take DWARF stack value pieces from LSB end
On Fri, Mar 10 2017, Pedro Alves wrote:
> On 03/08/2017 06:26 PM, Andreas Arnez wrote:
>
>> * pieces reaching outside the stack value bits are considered undefined,
>> and a zero value can be used instead.
>
> I'm not exactly sure what that means, but doesn't "undefined" suggest
> "optimized out" instead?
For instance, consider a 20-byte piece from a stack value that is only 8
bytes wide. AFAIK, this is invalid DWARF.
If we want to handle this case more gracefully, we could mark the upper
12 bytes optimzed out and still use the lower 8 bytes. Or we could
treat it as an implementation-defined extension and perform zero- (or
sign-) extension to the full piece size. But so far I didn't see it in
the scope of this bug fix to add such logic, particularly since it
doesn't exist for any other piece type either.
--
Andreas