Re: [rfa:NetBSD/ppc] Implement signal trampoline unwinder

Andrew Cagney
2004-03-02T22:48:17Z

> On Sun, 29 Feb 2004 20:05:28 -0500
> Andrew Cagney <cagney@gnu.org> wrote:
>
>
>>> * ppcnbsd-tdep.c: Include "trad-frame.h", and "frame-unwind.h".
>>> (struct ppcnbsd_sigtramp_cache, ppcnbsd_sigtramp_this_id)
>>> (ppcnbsd_sigtramp_prev_register, ppcnbsd_sigtramp_cache)
>>> (ppcnbsd_sigtramp_sniffer, ppcnbsd_sigtramp_unwind)
>>> (ppcnbsd_init_abi): Implement a NetBSD/PPC signal trampline
>>> unwinder, register.
>
>
> After reading the disucssion, the only part about this which bothers
> me is the part that you yourself had a question about:
>
>
>>> + if (frame_pc_unwind (next_frame) > 0x7f000000)
>>> + /* Assume anything that is vaguely on the stack is a signal
>>> + trampoline. */
>>> + return &ppcnbsd_sigtramp_unwind;
>
>
> Given Mark K's comments, I think it would be better to check for a
> specific instruction sequence. I know it's expensive, but it seems
> like a more robust approach. (But, also given Mark K's comments,
> it seems that a name based approach will work well in the future.)

We'd better wait for Jason's input then. Jason will hopefully know
exactly what the rules here are - which is better than us all guessing :-)

Andrew