From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: arnez@linux.vnet.ibm.com (Andreas Arnez)
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] PR gdb/21226: Take DWARF stack value pieces from LSB end
Date: Fri, 10 Mar 2017 20:01:00 -0000 [thread overview]
Message-ID: <20170310200108.14140D806AB@oc3748833570.ibm.com> (raw)
In-Reply-To: <m3k27xexv6.fsf@oc1027705133.ibm.com> from "Andreas Arnez" at Mar 10, 2017 08:27:09 PM
Andreas Arnez wrote:
> 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?
That sounds right, and is compatible with what is done for full
DWARF_VALUE_STACK values in dwarf2_evaluate_loc_desc_full.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2017-03-10 20:01 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
2017-03-10 20:01 ` Ulrich Weigand [this message]
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=20170310200108.14140D806AB@oc3748833570.ibm.com \
--to=uweigand@de.ibm.com \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
/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