From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23044 invoked by alias); 21 Apr 2005 19:23:35 -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 23028 invoked from network); 21 Apr 2005 19:23:29 -0000 Received: from unknown (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 21 Apr 2005 19:23:29 -0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j3LJNQrj008075; Thu, 21 Apr 2005 21:23:26 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j3LJNPqA005249; Thu, 21 Apr 2005 21:23:25 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j3LJNHo6010891; Thu, 21 Apr 2005 21:23:17 +0200 (CEST) Date: Thu, 21 Apr 2005 19:23:00 -0000 Message-Id: <200504211923.j3LJNHo6010891@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: davem@davemloft.net CC: gdb-patches@sources.redhat.com In-reply-to: <20050420204427.20d670e6.davem@davemloft.net> Subject: Re: [PATCH] Add sparc64-linux sigtramp support References: <20050420204427.20d670e6.davem@davemloft.net> X-SW-Source: 2005-04/txt/msg00257.txt.bz2 Date: Wed, 20 Apr 2005 20:44:27 -0700 From: "David S. Miller" This patch gets signal backtraces working properly on sparc64/linux targets. The two non-straightforward parts of the implementation are: 1) proper stack bias adjusting of cache->base 2) registering the sniffer in the correct order The issue in #2 is that we use the solaris2 sparc64 target support as our base, then override and add things which are different for the linux sparc64 target. FYI, "issue" #1 is to make sure the frame base address matches with what the DWARF2 unwinder thinks. The solaris2 sparc64 osabi init which we call registers first the solaris2 sigtramp sniffer, then the generic sparc64 frame sniffer, via sparc64_init_abi(). Therefore we have to register the linux sparc64 sniffer before we invoke sparc64_sol2_init_abi(). Yes, indeed. While doing this work I noticed that the signal trampoline symbols names were wrong in the 32-bit sparc linux sigtramp support. Those are the i386 glibc symbol names, not the sparc ones :-) So I corrected those and also documented the "struct pt_regs" layout that we're picking sigtramp registers from. Ah thanks for noticing that pasto; I probably didn't notice for the reason explained in the comment. I'm not thrilled by documenting the "struct pt_regs" layout. The constants already are there in the code. I think it is more important to document where to find the offsets. I also think it is better to point people to "struct sigcontext" instead of "struct pt_regs". That's where I got them from. Can you change the comment in something like: /* Offsets from . */ ? Otherwise this is ok, so please go ahead. Oh, except for the fact that there is a tab instead of a space between "symbol" and "names" in the ChangeLog entry ;-). Mark P.S. I'm close to enabling the DWARF2 unwinder for SPARC, but there still are a few issues that I have to solve yet. None of these affect Linux/sparc64. I can send you a patch to test if you want.