From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7067 invoked by alias); 3 Apr 2005 19:03:50 -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 6950 invoked from network); 3 Apr 2005 19:03:38 -0000 Received: from unknown (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 3 Apr 2005 19:03:38 -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 j33J3Wf7018048; Sun, 3 Apr 2005 21:03:32 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.3/8.13.3) with ESMTP id j33J3Vbc030841; Sun, 3 Apr 2005 21:03:31 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.3/8.13.3/Submit) id j33J3VC8017984; Sun, 3 Apr 2005 21:03:31 +0200 (CEST) Date: Sun, 03 Apr 2005 19:03:00 -0000 Message-Id: <200504031903.j33J3VC8017984@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: mark.kettenis@xs4all.nl, gdb-patches@sourceware.org In-reply-to: <20050403003443.GA23039@nevyn.them.org> (message from Daniel Jacobowitz on Sat, 2 Apr 2005 19:34:43 -0500) Subject: Re: [RFC] Teach dwarf2-frame.c about StackGhost References: <200504022218.j32MIgoQ032738@elgar.sibelius.xs4all.nl> <20050403003443.GA23039@nevyn.them.org> X-SW-Source: 2005-04/txt/msg00035.txt.bz2 Date: Sat, 2 Apr 2005 19:34:43 -0500 From: Daniel Jacobowitz On Sun, Apr 03, 2005 at 12:18:42AM +0200, Mark Kettenis wrote: > One of the things that still keeps me from enabling the DWARF2 > unwinder on SPARC is the fact that it doesn't play nice with > StackGhost. Here is an attempt to make dwarf2-frame.c deal with it by > introducing yet another register rule. People might object since this > is only sort of architecture independent code. However it seems that > this is the cleanest way to solve this. Ewww... this isn't even vaguely architecture independent code. It seems like it's in the wrong place; there's no reason StackGhost must be restricted to register windows. On the contrary. The whole idea pretty much depends on the concept of register windows. Now the number of register window architectures is fairly limited: SPARC, UltraSPARC and IA-64. Here's an alternative that I think is cleaner (and will work... I hope): create a sparc-specific unwinder. Its sniffer can call the dwarf2 sniffer; similarly for this_id and prev_register. Then you can handle the StackGhost cookie when you are requested to unwind the PC. The problem here is that whether you need to apply the stackghost cookie is highly dependent on where exactly %i7 is stored. If it is stored in the reserved stack slot then you need to apply the cookie, otherwise you won't. The way you suggests makes it hard to get at that information. Mark