From: Simon Marchi <simon.marchi@polymtl.ca>
To: John Darrington <john@darrington.wattle.id.au>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/4] Add a dwarf unit type to represent 24 bit values.
Date: Thu, 27 Sep 2018 17:53:00 -0000 [thread overview]
Message-ID: <a0c8e35c7d5b22cf08a302da61bcda83@polymtl.ca> (raw)
In-Reply-To: <20180927054924.e5hgaw4dwdkjezv3@jocasta.intra>
On 2018-09-27 01:49, John Darrington wrote:
> On Wed, Sep 26, 2018 at 10:53:34PM -0400, Simon Marchi wrote:
> On 2018-09-26 13:41, John Darrington wrote:
> > After discussion with the gcc folks, it seems that there is an
> easier
> > and much simpler solution, which I'm attaching.
> >
> > J'
>
> Err can you explain how this works, or link to the gcc discussion
> if it's
> explained there? I must be missing something, because as far as I
> understand, this will read 4 bytes when reading an address, when I
> suppose it's encoded with 3 bytes in the DWARF info, isn't it?
>
> Simon
>
> The relevant discussion is here:
> https://gcc.gnu.org/ml/gcc-patches/2018-09/msg00712.html
>
> The bottom line is that the dwarf address size does not need to
> correspond to the machine address size (and in general it does not) -
> it just needs to be at least as long.
After a short discussion with John on IRC, what I understand is that the
debug info he is dealing with encodes the 24-bit addresses on 32-bits,
with the most significant byte equal to zero. Therefore that revised
patch looks ok to me. I would just ask you to add a comment explaining
that this "case" exists for producer XYZ on S12Z, which encodes 24 bit
addresses on 32 bits. Maybe that in the future somebody will stumble on
a producer that encodes 24 bit addresses on 24 bits. Having an
explanation for why things are the way they are will help.
Thanks,
Simon
next prev parent reply other threads:[~2018-09-27 17:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 14:18 S12Z [new patchset] John Darrington
2018-08-29 14:18 ` [PATCH 1/4] gdb: Add builtin types for 24 bit integers John Darrington
2018-09-07 22:04 ` Tom Tromey
2018-09-08 4:27 ` John Darrington
2018-09-08 5:56 ` Tom Tromey
2018-08-29 14:18 ` [PATCH 3/4] GDB: Add support for 24 bit addresses John Darrington
2018-09-07 22:04 ` Tom Tromey
2018-08-29 14:19 ` [PATCH 4/4] GDB: New target s12z John Darrington
2018-09-07 22:03 ` Tom Tromey
2018-09-08 4:46 ` John Darrington
2018-09-08 13:16 ` Tom Tromey
2018-09-08 13:21 ` John Darrington
2018-08-29 14:19 ` [PATCH 2/4] Add a dwarf unit type to represent 24 bit values John Darrington
2018-09-07 21:50 ` Tom Tromey
2018-09-26 17:42 ` John Darrington
2018-09-27 2:53 ` Simon Marchi
2018-09-27 5:49 ` John Darrington
2018-09-27 17:53 ` Simon Marchi [this message]
2018-09-28 16:03 ` John Darrington
2018-09-07 22:46 ` S12Z [new patchset] Simon Marchi
2018-09-08 4:18 ` John Darrington
2018-09-08 6:30 ` John Darrington
2018-09-08 21:37 ` Simon Marchi
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=a0c8e35c7d5b22cf08a302da61bcda83@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=john@darrington.wattle.id.au \
--cc=tom@tromey.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