Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Michal Ludvig <mludvig@suse.cz>
Cc: Gerhard Tonn <TON@de.ibm.com>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFC] DWARF2 CFI exploitation for Linux on S/390
Date: Mon, 30 Sep 2002 08:53:00 -0000	[thread overview]
Message-ID: <3D98736C.30607@redhat.com> (raw)
In-Reply-To: <3D986506.2010401@suse.cz>


> What needs to be done for this in general?

The theory is that the function:

static void
set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp,
                   frame_register_unwind_ftype **unwind)
{
   if (!USE_GENERIC_DUMMY_FRAMES)
     /* Still need to set this to something.  The ``info frame'' code
        calls this function to find out where the saved registers are.
        Hopefully this is robust enough to stop any core dumps and
        return vaguely correct values..  */
     *unwind = frame_saved_regs_register_unwind;
   else if (PC_IN_CALL_DUMMY (pc, fp, fp))
     *unwind = generic_call_dummy_register_unwind;
   else
     *unwind = frame_saved_regs_register_unwind;
}

is modified so that it contains a clause like:

	else if (this frame's block contains dwarf2cfi
	         && this target things it works with dwarf2cfi)
	  *unwind = dwarf2cfi_register_unwind;

where dwarf2cfi_register_unwind() is strictly *recursive* - it uses 
functions defined in frame.h when it needs a read a more inner register.
Variation on the theme might be:

	else if (architecture things its got a custom unwind function for this 
frame's block)
	  *unwind = architecture's custom unwind function

There are warts in the theory - also need to add a per-frame 
frame_saved_pc() and (probably) some sort of per-frame frame_chain(). 
(see recent post to gdb@).

Andrew



      parent reply	other threads:[~2002-09-30 15:53 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
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 [this message]

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=3D98736C.30607@redhat.com \
    --to=ac131313@redhat.com \
    --cc=TON@de.ibm.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mludvig@suse.cz \
    /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