Re: Revamp sniffer; Was: [obish?sym;rfa:doc] Wire up vsyscall

Andrew Cagney
2004-06-11T17:32:52Z

[-- Attachment #1: Type: text/plain, Size: 5 bytes --]

ping

[-- Attachment #2: Attached Message --]
[-- Type: message/rfc822, Size: 9162 bytes --]

[-- Attachment #2.1.1: Type: text/plain, Size: 175 bytes --]

Mark,

Want do you want to do here? Commit daniel's patch for the short term
while I clean this up proper over the medium term (appending it to the
vsyscall list)?

Andrew

[-- Attachment #2.1.2: Attached Message --]
[-- Type: message/rfc822, Size: 4991 bytes --]

From: Andrew Cagney <cagney@gnu.org>
To: Mark Kettenis <kettenis@chello.nl>
Cc: drow@false.org, gdb-patches@sources.redhat.com, roland@redhat.com
Subject: Revamp sniffer; Was: [obish?sym;rfa:doc] Wire up vsyscall
Date: Mon, 17 May 2004 13:14:48 -0400
Message-ID: <40A8F308.9040900@gnu.org>

> 2004-01-25 Daniel Jacobowitz <drow@mvista.com>
>
> * i386-tdep.c (i386_gdbarch_init): Check for signal frame first.
> * i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Handle
> __kernel_sigreturn.
>
[...]
> I'm somewhat reluctant to throw the CFI completely overboard.

Yes.

> How
> about extending the DWARF2 unwinder such that we can set the
> [SIGTRAMP_FRAME] attribute based on the function's name?

The frame attributes (tramp et.al.) in many cases are orthogonal to the
unwind mechanism, but sometimes they are not).

At present the frame sniffer is focused solely on identifying and
returning an unwinder. The frame's type being identified as an
unexpected sid effect. I think this should be inverted vis:

frame_sniffer () ->
- attributes
- unwinder (or NULL, indicating sniff for unwinder)
- base (or NULL, indicating sniff for base)
- ...

so while the type is determined up front, other things are optional.
That way here the tramp code would look like:

if (name == _kernel_sigreturn)
if (cfi at address)
return { attribute=TRAMP; unwinder=cfi_unwinder; base=NULL };
else
return { attribute=TRAMP; unwinder=alt_unwinder; base=NULL };

this also opens the way for us doing:

if (name == solib-trampoline)
return { attribute=TRAMP|CALLEE; unwinder=NULL; base=NULL }

i.e., it's a trampoline (need to skip it) but let something more generic
identify the unwinder.

Andrew