From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24023 invoked by alias); 12 Dec 2004 15:48:23 -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 24004 invoked from network); 12 Dec 2004 15:48:19 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 12 Dec 2004 15:48:19 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id iBCFmEIg014278 for ; Sun, 12 Dec 2004 10:48:19 -0500 Received: from localhost.redhat.com (vpn50-50.rdu.redhat.com [172.16.50.50]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id iBCFmDr02107; Sun, 12 Dec 2004 10:48:13 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id AFBF43EF9; Sun, 12 Dec 2004 10:46:11 -0500 (EST) Message-ID: <41BC67C0.6080106@gnu.org> Date: Sun, 12 Dec 2004 16:27:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA/alpha-osf] another next frame confusion in signal unwinder? References: <20041201235125.GL1001@adacore.com> In-Reply-To: <20041201235125.GL1001@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-12/txt/msg00328.txt.bz2 Joel Brobecker wrote: > It looks to me that we already have the next frame, so computing > the next frame of that frame in alpha_osf1_sigcontext_addr() is > making us using the wrong frame when getting the base address for > the signal context area. So I changed this function to: > > static CORE_ADDR > alpha_osf1_sigcontext_addr (struct frame_info *next_frame) > { > return (read_memory_integer (get_frame_base (next_frame), 8)); > } > > This fixes the problem above, and I obtain the expected callstack. > > 2004-12-01 Joel Brobecker > > * alpha-osf1-tdep.c (alpha_osf1_sigcontext_addr): Change > parameter name to make it clear that we already have a next > frame. Return the sigcontext from that next frame instead > of the frame following it. > Fixes [DB30-017]. > > Tested on alpha-tru64 5.1a. No regression. > > OK to apply? > > > ------------------------------------------------------------------------ > > Index: alpha-osf1-tdep.c > =================================================================== > RCS file: /nile.c/cvs/Dev/gdb/gdb-6.3/gdb/alpha-osf1-tdep.c,v > retrieving revision 1.3 > diff -u -p -r1.3 alpha-osf1-tdep.c > --- alpha-osf1-tdep.c 21 Oct 2004 00:08:34 -0000 1.3 > +++ alpha-osf1-tdep.c 1 Dec 2004 17:54:46 -0000 > @@ -35,14 +35,9 @@ alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, > } > > static CORE_ADDR > -alpha_osf1_sigcontext_addr (struct frame_info *frame) > +alpha_osf1_sigcontext_addr (struct frame_info *next_frame) > { > - struct frame_info *next_frame = get_next_frame (frame); > - > - if (next_frame != NULL) > - return (read_memory_integer (get_frame_base (next_frame), 8)); > - else > - return (read_memory_integer (get_frame_base (frame), 8)); > + return (read_memory_integer (get_frame_base (next_frame), 8)); (I need to deprecate get frame base). Can you just tweak this to return get_frame_id().stack_addr before committing. thanks, Andrew > } > > static void