Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Andrew Cagney <cagney@gnu.org>
Cc: Jason R Thorpe <thorpej@wasabisystems.com>,
	gdb-patches@sources.redhat.com
Subject: Re: [rfa:NetBSD/ppc] Implement signal trampoline unwinder
Date: Mon, 01 Mar 2004 02:47:00 -0000	[thread overview]
Message-ID: <20040301024711.GA27915@nevyn.them.org> (raw)
In-Reply-To: <404292D7.9040100@gnu.org>

On Sun, Feb 29, 2004 at 08:33:11PM -0500, Andrew Cagney wrote:
> >On Sun, Feb 29, 2004 at 08:05:28PM -0500, Andrew Cagney wrote:
> >
> >>>It appears to work (but doesn't have much effect without an rs6000 
> >>>unwinder).
> >>>
> >>>One question (and to follow up my earlier post) is there a better way of 
> >>>doing this:
> >>>
> >>>+  if (frame_pc_unwind (next_frame) > 0x7f000000)
> >>>+    /* Assume anything that is vaguely on the stack is a signal
> >>>+       trampoline.  */
> >>>+    return &ppcnbsd_sigtramp_unwind;
> >>>
> >>>ok?, eventually for 6.1?
> >
> >
> >For other targets, we grub in the code for the sigtramp instruction
> >sequence.  I'm betting it's fixed for NetBSD too?  ppc_linux_in_sigtramp
> >does this.
> 
> That's potentially expensive - there should also be a predicate like the 
> above before the stack is read checked.

Then you risk both sigaltstack and thread support.  Thread stacks can
end up literally anywhere - and do!

It might be possible to compare to the current stack pointer, if you're
convinced the sigreturn sequence will remain on the stack.  I don't
know anything about NetBSD - for e.g. i386 GNU/Linux, this isn't
necessarily true, but that's handled specially.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


WARNING: multiple messages have this Message-ID
From: Daniel Jacobowitz <drow@false.org>
To: Andrew Cagney <cagney@gnu.org>
Cc: Jason R Thorpe <thorpej@wasabisystems.com>,
	gdb-patches@sources.redhat.com
Subject: Re: [rfa:NetBSD/ppc] Implement signal trampoline unwinder
Date: Fri, 19 Mar 2004 00:09:00 -0000	[thread overview]
Message-ID: <20040301024711.GA27915@nevyn.them.org> (raw)
Message-ID: <20040319000900.pMTDKkdICw-k4lLKdKbxzFabLeGYw9ixTCMTojdSxn0@z> (raw)
In-Reply-To: <404292D7.9040100@gnu.org>

On Sun, Feb 29, 2004 at 08:33:11PM -0500, Andrew Cagney wrote:
> >On Sun, Feb 29, 2004 at 08:05:28PM -0500, Andrew Cagney wrote:
> >
> >>>It appears to work (but doesn't have much effect without an rs6000 
> >>>unwinder).
> >>>
> >>>One question (and to follow up my earlier post) is there a better way of 
> >>>doing this:
> >>>
> >>>+  if (frame_pc_unwind (next_frame) > 0x7f000000)
> >>>+    /* Assume anything that is vaguely on the stack is a signal
> >>>+       trampoline.  */
> >>>+    return &ppcnbsd_sigtramp_unwind;
> >>>
> >>>ok?, eventually for 6.1?
> >
> >
> >For other targets, we grub in the code for the sigtramp instruction
> >sequence.  I'm betting it's fixed for NetBSD too?  ppc_linux_in_sigtramp
> >does this.
> 
> That's potentially expensive - there should also be a predicate like the 
> above before the stack is read checked.

Then you risk both sigaltstack and thread support.  Thread stacks can
end up literally anywhere - and do!

It might be possible to compare to the current stack pointer, if you're
convinced the sigreturn sequence will remain on the stack.  I don't
know anything about NetBSD - for e.g. i386 GNU/Linux, this isn't
necessarily true, but that's handled specially.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  parent reply	other threads:[~2004-03-01  2:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19  0:09 Andrew Cagney
2004-03-01  1:05 ` Andrew Cagney
2004-03-01  1:26 ` Daniel Jacobowitz
2004-03-19  0:09   ` Andrew Cagney
2004-03-01  1:33     ` Andrew Cagney
2004-03-01  2:47     ` Daniel Jacobowitz [this message]
2004-03-01  9:34       ` Mark Kettenis
2004-03-19  0:09         ` Mark Kettenis
2004-03-19  0:09         ` Jason Thorpe
2004-03-02 23:29           ` Jason Thorpe
2004-03-03 20:43           ` Andrew Cagney
2004-03-03 20:46             ` Jason Thorpe
2004-03-03 21:20               ` Mark Kettenis
2004-03-19  0:09                 ` Mark Kettenis
2004-03-19  0:09               ` Jason Thorpe
2004-03-19  0:09             ` Andrew Cagney
2004-03-19  0:09           ` Andrew Cagney
2004-03-03  0:18             ` Andrew Cagney
2004-03-03 15:17             ` Andrew Cagney
2004-03-19  0:09               ` Andrew Cagney
2004-03-19  0:09       ` Daniel Jacobowitz
2004-03-19  0:09   ` Daniel Jacobowitz
2004-03-19  0:09 ` Kevin Buettner
2004-03-02 22:21   ` Kevin Buettner
2004-03-19  0:09   ` Andrew Cagney
2004-03-02 22:48     ` Andrew Cagney

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=20040301024711.GA27915@nevyn.them.org \
    --to=drow@false.org \
    --cc=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=thorpej@wasabisystems.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