From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31301 invoked by alias); 2 Mar 2004 23:29:17 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31280 invoked from network); 2 Mar 2004 23:29:15 -0000 Received: from unknown (HELO yeah-baby.shagadelic.org) (208.176.2.162) by sources.redhat.com with SMTP; 2 Mar 2004 23:29:15 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by yeah-baby.shagadelic.org (Postfix) with ESMTP id 9382D1E0DD8; Tue, 2 Mar 2004 15:29:14 -0800 (PST) In-Reply-To: <200403010933.i219X4v3002550@elgar.kettenis.dyndns.org> References: <40428C58.1020506@gnu.org> <20040301012656.GA16265@nevyn.them.org> <404292D7.9040100@gnu.org> <20040301024711.GA27915@nevyn.them.org> <200403010933.i219X4v3002550@elgar.kettenis.dyndns.org> Mime-Version: 1.0 (Apple Message framework v612) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-3--968768423" Message-ID: <6FDEB6FE-6CA1-11D8-BE41-000A957650EC@wasabisystems.com> Content-Transfer-Encoding: 7bit Cc: drow@false.org, cagney@gnu.org, gdb-patches@sources.redhat.com From: Jason Thorpe Subject: Re: [rfa:NetBSD/ppc] Implement signal trampoline unwinder Date: Tue, 02 Mar 2004 23:29:00 -0000 To: Mark Kettenis X-Pgp-Agent: GPGMail 1.0 (v30, 10.3) X-SW-Source: 2004-03.o/txt/msg00035.txt Message-ID: <20040302232900.PfcAcbNClURi5_wP4QDxXGJpg9noOVydNMFuHdMDpbM@z> --Apple-Mail-3--968768423 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Content-length: 1163 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 --Apple-Mail-3--968768423 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit Content-length: 186 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (Darwin) iD8DBQFARRjTOpVKkaBm8XkRAi9+AJ4od2ab65wIIIcHx/WgiTjIa05VfACgtPbp JWUtRRZuQ8J3v+HddzbfG6U= =5TrW -----END PGP SIGNATURE----- --Apple-Mail-3--968768423--