Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Mark Kettenis <kettenis@gnu.org>
Cc: drow@false.org, gdb-patches@sources.redhat.com,
	ezannoni@redhat.com, roland@redhat.com
Subject: Re: [rfa] Attach vsyscall support for GNU/Linux
Date: Mon, 25 Oct 2004 22:46:00 -0000	[thread overview]
Message-ID: <417D81D5.1000206@gnu.org> (raw)
In-Reply-To: <200410252212.i9PMCQhJ031724@elgar.sibelius.xs4all.nl>

Mark Kettenis wrote:
>    Date: Sun, 24 Oct 2004 19:16:36 -0400
>    From: Daniel Jacobowitz <drow@false.org>
> 
> Thanks for the explanation Daniel!
> 
>    Unwinding bugs aside, I think it's valuable for GDB to know that it is
>    at a signal trampoline.  I think the custom display in backtrace is
>    valuable.  That means we should look for signal handlers before looking
>    for CFI.  For NPTL that value judgement would fall the other way - not
>    having to special-case signal handlers is a clear win.
> 
> Given the fact that it is desirable for GDB to know that it's dealing
> with a signal handler, I think the correct approach is to extend the
> DWARF2 unwinder with a method to get the frame type, similar to what
> we already do for pre-initializing the register state.

The ``correct approach'' is both more complicated and simplier (the 
complexity comes with the amount of refactoring, the simplicity from the 
result):

At present we've the relationship:

    FRAME <>---- UNWINDER
      <>
       |
    FUNCTION ---> SYMBOL

where the UNWINDER is providing attributes and methods such as:

   - unwind register
   - callee frame?

while the FUNCTION provides attributes such as:

   - code start/range
   - function name

It needs to be changed so more like:

                    SYMBOL
                     /|\
                      |
    FRAME <>----- FUNCTION <>------ UNWINDER

and have the FUNCTION provide:

   - signal trampoline?
   - code start/range
   - function name

and the FUNCTION's unwinder just supply registers.  For the case being 
discussed, this would let us equally implement:

     FRAME <>----- SIGTRAMP-FUNCTION <>----- DWARF2-UNWINDER

     FRAME <>----- SIGTRAMP-FUNCTION <>----- SIGTRAMP-UNWINDER

     FRAME <>----- SIGTRAMP-FUNCTION <>----- UNWINDER-PROXY

(for the last case, the actual unwinder being selected if/when needed).

On the down side, this means replacing the frame identification 
heuristic found in frame-unwind with robust logic in the symtab, and 
expanding symbol.

On the upside, this means that the function symbol starts correctly 
identifying these probed frames (at present the're all b-).

Andrew


  reply	other threads:[~2004-10-25 22:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-24 18:53 Daniel Jacobowitz
2004-10-24 20:55 ` Mark Kettenis
2004-10-24 23:16   ` Daniel Jacobowitz
2004-10-25 22:12     ` Mark Kettenis
2004-10-25 22:46       ` Andrew Cagney [this message]
2004-11-01 22:13         ` Mark Kettenis
2004-11-02 14:28           ` Andrew Cagney
2004-11-01 16:15       ` Daniel Jacobowitz
2004-11-01 20:45         ` Mark Kettenis
2004-11-01 22:32           ` Daniel Jacobowitz
2004-11-02 14:29             ` Andrew Cagney
2004-11-07 21:35               ` Daniel Jacobowitz
2004-11-08 16:40                 ` Andrew Cagney
2004-11-05 23:42           ` Daniel Jacobowitz
2004-11-07 17:36             ` Mark Kettenis
2004-11-07 21:18               ` Daniel Jacobowitz
2004-11-07 21:34                 ` Mark Kettenis
2004-10-25 22:54     ` Andrew Cagney
2004-10-26  2:51     ` Roland McGrath
2004-10-26  8:17       ` Jakub Jelinek
2004-10-26 13:27         ` Daniel Jacobowitz

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=417D81D5.1000206@gnu.org \
    --to=cagney@gnu.org \
    --cc=drow@false.org \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@gnu.org \
    --cc=roland@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