From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: "Ulrich Weigand" <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] PR gdb/21226: Take DWARF stack value pieces from LSB end
Date: Fri, 10 Mar 2017 19:27:00 -0000 [thread overview]
Message-ID: <m3k27xexv6.fsf@oc1027705133.ibm.com> (raw)
In-Reply-To: <20170310175740.21D9CD806AB@oc3748833570.ibm.com> (Ulrich Weigand's message of "Fri, 10 Mar 2017 18:57:40 +0100 (CET)")
On Fri, Mar 10 2017, Ulrich Weigand wrote:
> Andreas Arnez wrote:
>
> Sorry, I overlooked one other issue:
>
>> + /* Piece offset is from least significant bit end. */
>> + if (bits_big_endian)
>> + source_offset_bits += obj_size - (p->offset + p->size);
>> + else
>> + source_offset_bits += p->offset;
>
> Should this really consult bits_big_endian, as opposed to the
> regular byte order? Note that in the DWARF_VALUE_REGISTER case,
> we have the same issue, and there the byte order is consulted.
Using the byte order would strictly be more correct, yes. As opposed to
register pieces, we would have to get it from a different gdbarch,
though. I think the right one would be the objfile gdbarch of the
underlying CU, right?
>
> (This doesn't make much of a difference today since in GDB
> bit order is always the same a byte order, but we might as
> well get it right ...)
>
> Also, is p->size the right value here? Note that the code before
> the loop might already have partially reduced the size and updated
> the this_size(_bits) variables. Again, I think this case basically
> ought to work the same as the DWARF_VALUE_REGISTER case. (Hmmm.
> On the other hand, maybe the DWARF_VALUE_REGISTER case is wrong.
> Either way, it should be the same :-))
Yeah, p->size is correct, and the code for DWARF_VALUE_REGISTER is
wrong. Again, I didn't want to mix fixes for other piece types into
this patch. So I'll add another patch for that.
--
Andreas
next prev parent reply other threads:[~2017-03-10 19:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 18:26 Andreas Arnez
2017-03-10 17:43 ` Ulrich Weigand
2017-03-10 19:24 ` Andreas Arnez
2017-03-10 17:57 ` Ulrich Weigand
2017-03-10 19:27 ` Andreas Arnez [this message]
2017-03-10 20:01 ` Ulrich Weigand
2017-03-13 12:18 ` Andreas Arnez
2017-03-10 19:29 ` Pedro Alves
2017-03-13 12:24 ` Andreas Arnez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3k27xexv6.fsf@oc1027705133.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox