Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michal Ludvig <mludvig@suse.cz>
To: Gerhard Tonn <TON@de.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFC] DWARF2 CFI exploitation for Linux on S/390
Date: Wed, 25 Sep 2002 03:31:00 -0000	[thread overview]
Message-ID: <3D91908A.8030308@suse.cz> (raw)
In-Reply-To: <OFF2B50A77.FEDF2231-ONC1256C3D.004F8BC0@de.ibm.com>

Gerhard Tonn wrote:
> 1) The sequence and number of DWARF2 registers are different from the gdb
> registers on s390 for some reason.
> 2) The DWARF2 CFA value is different from the frame_base value.
> 
> In order to adapt the code to the first item, I have introduced #defines
> for DWARF2 registers and a REGNUM_TO_DWARF2_REG macro and its
> implementation. See the attached patch for details.

It makes sense. This wasn't yet noticed because the numbering of most 
dwarf2 and x86-64 registres is intentionally the same.

> The following code fragment in dwarf2cfi.c around line 1316 seems to be
> intel specific, at least on s390 it doesn't make sense. Should I move it to
> a gdbarch function?
> 
> if (i == SP_REGNUM)
>      {
>         context->reg[i].how = REG_CTX_VALUE;
>         context->reg[i].loc.addr = cfa;
>       }

Not only Intel specific. Also AMD specific ;-)

> Finally I am interested in how signal frame and dummy frame handling is
> supposed to work with DWARF2 CFI support. Does anybody have done already
> work in this area?

That's the question I'm solving too. The first approach (for x86-64) is 
here: http://sources.redhat.com/ml/gdb-patches/2002-09/msg00384.html
Basically I don't set_gdbarch_*() directly to cfi_*() functions but 
instead to corresponding x86_64_*() functions, that eventually call 
cfi_*() themselves. For sighandler caller frames I'm afraid I'll have to 
manually fill appropriate structures in struct context (probably in 
those x86_64_*() functions).

Michal Ludvig
-- 
* SuSE CR, s.r.o     * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz


  reply	other threads:[~2002-09-25 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-24  5:23 Gerhard Tonn
2002-09-25  3:31 ` Michal Ludvig [this message]
2002-09-26 19:54   ` Andrew Cagney
2002-09-30  7:51     ` Michal Ludvig
2002-09-30  8:24       ` Hans-Peter Nilsson
2002-09-30  8:53       ` Andrew Cagney

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=3D91908A.8030308@suse.cz \
    --to=mludvig@suse.cz \
    --cc=TON@de.ibm.com \
    --cc=gdb-patches@sources.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