Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jason Thorpe <thorpej@wasabisystems.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: drow@false.org, cagney@gnu.org, 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: <6FDEB6FE-6CA1-11D8-BE41-000A957650EC@wasabisystems.com> (raw)
In-Reply-To: <200403010933.i219X4v3002550@elgar.kettenis.dyndns.org>

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


On Mar 1, 2004, at 1:33 AM, Mark Kettenis wrote:

> The problem is that the location of the signal trampoline depends on
> the VM layout, which can be changed.  And on OpenBSD (which is very
> similar to NetBSD in many respects) the signal trampoline is mapped at
> a random location.  So checking for the address isn't the most robust
> way.  That's why NetBSD/i386 doesn't do this anymore, but instead
> looks for a specific instruction sequence (the instruction sequence
> for the sigreturn(2) system call).

Yes, other NetBSD targets do this as well, Alpha and MIPS, for example.

> NetBSD is moving away from using kernel-provided signal trampolines.
> NetBSD 2.0 will use signal trampolines provided by libc.  These
> tramplones can be recognized by their name: they start with
> __sigtramp.  See nbsd-tdep.c:nbsd_pc_in_sigtramp() and its usage in
> amd64nbsd-tdep.c.

Right.  They've been provided by libc for quite some time in -current, 
and 2.0 will ship with them when it ships.

In general, I think doing things in the debugger based on a priori 
knowledge of a magic address is kinda gross.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

WARNING: multiple messages have this Message-ID
From: Jason Thorpe <thorpej@wasabisystems.com>
To: Mark Kettenis <kettenis@chello.nl>
Cc: drow@false.org, cagney@gnu.org, gdb-patches@sources.redhat.com
Subject: Re: [rfa:NetBSD/ppc] Implement signal trampoline unwinder
Date: Tue, 02 Mar 2004 23:29:00 -0000	[thread overview]
Message-ID: <6FDEB6FE-6CA1-11D8-BE41-000A957650EC@wasabisystems.com> (raw)
Message-ID: <20040302232900.PfcAcbNClURi5_wP4QDxXGJpg9noOVydNMFuHdMDpbM@z> (raw)
In-Reply-To: <200403010933.i219X4v3002550@elgar.kettenis.dyndns.org>

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


On Mar 1, 2004, at 1:33 AM, Mark Kettenis wrote:

> The problem is that the location of the signal trampoline depends on
> the VM layout, which can be changed.  And on OpenBSD (which is very
> similar to NetBSD in many respects) the signal trampoline is mapped at
> a random location.  So checking for the address isn't the most robust
> way.  That's why NetBSD/i386 doesn't do this anymore, but instead
> looks for a specific instruction sequence (the instruction sequence
> for the sigreturn(2) system call).

Yes, other NetBSD targets do this as well, Alpha and MIPS, for example.

> NetBSD is moving away from using kernel-provided signal trampolines.
> NetBSD 2.0 will use signal trampolines provided by libc.  These
> tramplones can be recognized by their name: they start with
> __sigtramp.  See nbsd-tdep.c:nbsd_pc_in_sigtramp() and its usage in
> amd64nbsd-tdep.c.

Right.  They've been provided by libc for quite some time in -current, 
and 2.0 will ship with them when it ships.

In general, I think doing things in the debugger based on a priori 
knowledge of a magic address is kinda gross.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

  reply	other threads:[~2004-03-02 23:29 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   ` Daniel Jacobowitz
2004-03-19  0:09   ` Andrew Cagney
2004-03-01  1:33     ` Andrew Cagney
2004-03-01  2:47     ` Daniel Jacobowitz
2004-03-01  9:34       ` Mark Kettenis
2004-03-19  0:09         ` Jason Thorpe [this message]
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         ` Mark Kettenis
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=6FDEB6FE-6CA1-11D8-BE41-000A957650EC@wasabisystems.com \
    --to=thorpej@wasabisystems.com \
    --cc=cagney@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kettenis@chello.nl \
    /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