Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Jacobowitz <drow@mvista.com>, Michal Ludvig <mludvig@suse.cz>
Cc: gdb <gdb@sources.redhat.com>, Mark Kettenis <kettenis@chello.nl>
Subject: Re: dwarf2 unwinding for i386
Date: Mon, 24 Jun 2002 09:29:00 -0000	[thread overview]
Message-ID: <3D1748E0.3080506@cygnus.com> (raw)
In-Reply-To: <20020624145358.GB3804@branoic.them.org>

> On Mon, Jun 24, 2002 at 03:39:30PM +0200, Michal Ludvig wrote:
> 
>> Hi all,
>> what do you think about adding dwarf2 unwinding (dwarf2cfi.c) to i386 
>> target? On x86-64 we are already using it for some time now and it seems 
>> to be quite stable. GCC folks are about to switch omit-frame-pointer on 
>> by default for i386 in a near future, but are waiting (as I understand 
>> it) for GDB to implement dwarf2 unwinding, so that the resulting code 
>> could be debugged. Can we make at least a testing branch with this 
>> support? Opinions? MarkK?
> 
> 
> If we do this, IMHO, we should support it for all architectures and not
> for just x86-64 and i386.  Everyone wins.

The theory is that it should be added here:

/* Using the PC, select a mechanism for unwinding a frame returning
    the previous frame.  The register unwind function should, on
    demand, initialize the ->context object.  */

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;
}

The i386 doesn't use generic dummy frames and targets need switch to 
generic_unwind_get_saved_register though :-(

Andrew



  reply	other threads:[~2002-06-24 16:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-24  6:39 Michal Ludvig
2002-06-24  7:54 ` Daniel Jacobowitz
2002-06-24  9:29   ` Andrew Cagney [this message]
2002-07-02  3:50 ` Dylan Cuthbert

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=3D1748E0.3080506@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=drow@mvista.com \
    --cc=gdb@sources.redhat.com \
    --cc=kettenis@chello.nl \
    --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