Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: gdb-patches@sourceware.org
Subject: Re: [rfa] frame address size incorrect if address size != ptr size
Date: Fri, 06 Aug 2010 16:27:00 -0000	[thread overview]
Message-ID: <201008061627.o76GRVra002284@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20100806155738.GA2815@calimero.vinschen.de> from "Corinna Vinschen" at Aug 06, 2010 05:57:38 PM

Corinna Vinschen wrote:
> On Aug  6 16:50, Ulrich Weigand wrote:
> > The difference between .eh_frame and .debug_frame is really fundamental;
> > .eh_frame holds *pointer* values in target "void *" format; while
> > .debug_frame holds *address* values using the same format as the rest
> > of the DWARF debug sections.
> > 
> > Therefore we will definitely have to make a distinction between the two.
> > If you have another suggestion how to achieve that, I'd certainly be
> > interested ...
> 
> I understand what you're up to, but to me this means that the above code
> from unwind-pe.h is potentially not usable for certain small targets,
> unless some conditions are met.
> 
> As it is the one example I really know well, let's stick to XStormy16
> for now.
> 
> The problem for XStormy16 in 16 bit pointer mode is that a pointer is
> not able to point to every place in the 24 bit address space the CPU can
> address.  For function pointers that means that the target potentially
> has to use a jump table.  For the stack that means it is restricted to
> the first 64K RAM.
> 
> So, afaics, the unwind-pe.h code only works correct for XStormy16, if
> either the application fits into the first 64K of memory, or if
> DW_EH_PE_absptr is not used, rather DW_EH_PE_pcrel, DW_EH_PE_textrel,
> DW_EH_PE_datarel, or DW_EH_PE_funcrel.  Oh, and then there's the
> type of _Unwind_Ptr, which would have to be big enough, 32 bit.

OK, I see what you mean.  So if we were to enable DWARF EH for XStormy16,
we'd either have to do what you just described (all of which should in
principle be doable), or else add something new to support larger "pointer"
or address types.  I'd assume this might then be a new encoding type ...

In any case, I'd still say that GDB today ought to match what GCC today
does, which is that DW_EH_PE_absptr encoding uses target-format pointers.
If and when GCC is extended, say to support another encoding type, we'd
then likewise extend GDB to support that new feature.


> > I'd reword this to make clear that this value is *not* used for .eh_frame,
> > but solely for .debug_frame.
> 
> Ok, will do.  I'd just like to put the discussion to an end, first.
> Just tell me what you think of what I wrote above.

Does the above make sense to you?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2010-08-06 16:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26 14:53 Corinna Vinschen
2010-08-04 11:35 ` Corinna Vinschen
2010-08-04 22:40   ` Jan Kratochvil
2010-08-05  8:06     ` Corinna Vinschen
2010-08-05 10:04       ` Ulrich Weigand
2010-08-05 12:30         ` Corinna Vinschen
2010-08-05 14:08           ` Ulrich Weigand
2010-08-05 14:30             ` Corinna Vinschen
2010-08-05 14:59               ` Ulrich Weigand
2010-08-05 15:30                 ` Corinna Vinschen
2010-08-05 16:52                   ` Ulrich Weigand
2010-08-06 10:48                     ` Corinna Vinschen
2010-08-06 11:17                       ` Mark Kettenis
2010-08-06 12:01                         ` Corinna Vinschen
2010-08-06 14:51                       ` Ulrich Weigand
2010-08-06 15:57                         ` Corinna Vinschen
2010-08-06 16:27                           ` Ulrich Weigand [this message]
2010-08-06 16:59                             ` Corinna Vinschen
2010-08-06 19:03                               ` Corinna Vinschen
2010-08-08 14:55                                 ` Ulrich Weigand

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=201008061627.o76GRVra002284@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.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