This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/4] Add a dwarf unit type to represent 24 bit values.
- From: John Darrington <john at darrington dot wattle dot id dot au>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: John Darrington <john at darrington dot wattle dot id dot au>, Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Fri, 28 Sep 2018 18:03:45 +0200
- Subject: Re: [PATCH 2/4] Add a dwarf unit type to represent 24 bit values.
- References: <20180829141845.26378-1-john@darrington.wattle.id.au> <20180829141845.26378-3-john@darrington.wattle.id.au> <878t4dvuyf.fsf@tromey.com> <20180926174157.mw5eocxlfmgliua7@jocasta.intra> <c4d38b96eee875c17d6b68d5c422e59c@polymtl.ca> <20180927054924.e5hgaw4dwdkjezv3@jocasta.intra> <a0c8e35c7d5b22cf08a302da61bcda83@polymtl.ca>
On Thu, Sep 27, 2018 at 01:53:35PM -0400, Simon Marchi wrote:
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.
When I look at the situation in more detail a number of things are
apparent:
1. The dwarf .frame_debug CFI information does indeed code these values
as 32 bits.
2. This would seem to contradict the dwarf 2.0 standard which says they are
"addressing-unit sized values".
3. objdump expects these values to be 24 bits.
4. However readelf expects them to be 32 bits.
5. Notwithstanding the above, the produced dwarf which I have, contains
lots of FDE entries, with lots of CFIs. However the contents of all
CFIs are empty. Consequently it's of little use.
Given the above, I think the best course of action is to do nothing, on
this point.
So I'll do without a dwarf unwinder until there's a producer which
actually produces something useful.
J'