From: Daniel Jacobowitz <drow@false.org>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com,
Mark Kettenis <kettenis@chello.nl>,
hunt@redhat.com
Subject: Re: [RFA] dwarf2-frame.c sign extension patch
Date: Thu, 22 Jul 2004 00:47:00 -0000 [thread overview]
Message-ID: <20040722004621.GA27215@nevyn.them.org> (raw)
In-Reply-To: <20040721174136.7eb32412@saguaro>
On Wed, Jul 21, 2004 at 05:41:36PM -0700, Kevin Buettner wrote:
> On Wed, 21 Jul 2004 17:17:23 -0400
> Daniel Jacobowitz <drow@false.org> wrote:
>
> > The rest I have no comment on, but this issue I know...
> >
> > On Wed, Jul 21, 2004 at 10:29:43PM +0200, Mark Kettenis wrote:
> > > (dwarf2_build_frame_info): Set unit.addr_size.
> > >
> > > Why is the old code wrong? The comment clearly says "from unit
> > > header" which is what the DWARF standard says (or at least implies).
> > > Theoretically it could change from compilation unit to compilation
> > > unit. So I think your change to replace it by
> > > TYPE_LENGTH(builtin_type_void_data_ptr) is wrong.
> >
> > The old code doesn't do it from the compilation unit header either:
> > - unit.addr_size = objfile->obfd->arch_info->bits_per_address / 8;
> > + unit.addr_size = TYPE_LENGTH (builtin_type_void_data_ptr);
> >
> > Any use of bits_per_address, IMO, is a bug. Take a look at how this
> > field is set on MIPS; it's based on the architecture, not the ABI or
> > the pointer size or the dwarf address size or anything like that.
>
> I agree.
>
> > TYPE_LENGTH doesn't seem like an ideal replacement. Can we use the
> > value in the compilation unit header here?
>
> I considered doing this, but was told that the information in
> .debug_frame should be independent of the CU header. I really
> don't know what the "right" solution is.
Oh, right, we're in .debug_frame here. I care very much about being
.able to use .debug_frame without .debug_info. Debian distributes
library images with only .debug_frame, to provide backtraces.
.debug_frame doesn't provide this information. That's a known defect;
I think that Jim proposed correcting it on the dwarf2 list.
Does anyone know if .eh_frame solves this problem somehow?
Otherwise, I think that using TYPE_LENGTH (with a big comment
explaining the issue) may be the best we can do.
--
Daniel Jacobowitz
next prev parent reply other threads:[~2004-07-22 0:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-20 19:11 Martin M. Hunt
2004-07-21 20:30 ` Mark Kettenis
2004-07-21 21:18 ` Daniel Jacobowitz
2004-07-22 0:41 ` Kevin Buettner
2004-07-22 0:47 ` Daniel Jacobowitz [this message]
2004-07-22 20:46 ` Mark Kettenis
2004-07-22 20:59 ` Daniel Jacobowitz
2004-07-23 17:54 ` Martin M. Hunt
2004-07-23 22:10 ` Mark Kettenis
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=20040722004621.GA27215@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=hunt@redhat.com \
--cc=kettenis@chello.nl \
--cc=kevinb@redhat.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