Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: Re: Add frame_is_callee_p(), use in dwarf2-frame.c?
Date: Wed, 02 Jul 2003 19:12:00 -0000	[thread overview]
Message-ID: <20030702191249.GA24531@nevyn.them.org> (raw)
In-Reply-To: <3F0328AF.9080706@redhat.com>

On Wed, Jul 02, 2003 at 02:47:11PM -0400, Andrew Cagney wrote:
> Hello,
> 
> Following up the comment:
> 
> >  /* Unwind the PC.
> >
> >     Note that if NEXT_FRAME is never supposed to return (i.e. a call
> >     to abort), the compiler might optimize away the instruction at
> >     NEXT_FRAME's return address.  As a result the return address will
> >     point at some random instruction, and the CFI for that
> >     instruction is probably wortless to us.  GCC's unwinder solves
> >     this problem by substracting 1 from the return address to get an
> >     address in the middle of a presumed call instruction (or the
> >     instruction in the associated delay slot).  This should only be
> >     done for "normal" frames and not for resume-type frames (signal
> >     handlers, sentinel frames, dummy frames).
> >
> >     We don't do what GCC's does here (yet).  It's not clear how
> >     reliable the method is.  There's also a problem with finding the
> >     right FDE; see the comment in dwarf_frame_p.  If dwarf_frame_p
> >     selected this frame unwinder because it found the FDE for the
> >     next function, using the adjusted return address might not yield
> >     a FDE at all.  The problem isn't specific to DWARF CFI; other
> >     unwinders loose in similar ways.  Therefore it's probably
> >     acceptable to leave things slightly broken for now.  */
> >  fs->pc = frame_pc_unwind (next_frame);
> 
> 
> Given MichaelC's flurry of bugs on this, should the fix be added to 6?
> 
> As for the dwarf2_frame_p test, outch!  Any ideas?  Change the parameter 
> to ``address_in_block'', instead of a PC?

That sounds reasonable...

> Regardless, for a ``normal frame'' test, I'd like to suggest 
> ``frame_is_callee_p()'' as something suitable descriptive.  Thoughts?

You've leapt ahead of me again.  What would frame_is_callee_p mean?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-07-02 19:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-02 18:47 Andrew Cagney
2003-07-02 19:12 ` Daniel Jacobowitz [this message]
2003-07-02 19:28   ` Andrew Cagney
2003-07-02 19:36     ` Daniel Jacobowitz
2003-07-03 16:18       ` Andrew Cagney
2003-07-02 19:14 Michael Elizabeth Chastain

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=20030702191249.GA24531@nevyn.them.org \
    --to=drow@mvista.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