From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18235 invoked by alias); 2 Mar 2004 23:01:08 -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 18226 invoked from network); 2 Mar 2004 23:01:07 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 2 Mar 2004 23:01:07 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i22N17b14226 for ; Tue, 2 Mar 2004 18:01:07 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i22N16803969 for ; Tue, 2 Mar 2004 18:01:06 -0500 Received: from localhost.localdomain (vpn50-15.rdu.redhat.com [172.16.50.15]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i22N16J5005786 for ; Tue, 2 Mar 2004 18:01:06 -0500 Received: from saguaro (saguaro.lan [192.168.64.2]) by localhost.localdomain (8.12.10/8.12.10) with SMTP id i22N10cG015864 for ; Tue, 2 Mar 2004 16:01:00 -0700 Date: Tue, 02 Mar 2004 23:01:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: Re: [rfa:rs6000] Framefy rs6000 (and GNU/Linux PPC) Message-Id: <20040302160100.573bbadc@saguaro> In-Reply-To: <40428F53.5080502@gnu.org> References: <40428F53.5080502@gnu.org> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03.o/txt/msg00034.txt On Sun, 29 Feb 2004 20:18:11 -0500 Andrew Cagney wrote: > The attached updates the rs6000 so that (well for NetBSD, "elf" and > GNU/Linux 32+64) it uses the frame unwinder. It doesn't yet enable > dwarf2-cfi. > > Apart from the bug: Use right frame ID in step_over_function > http://sources.redhat.com/ml/gdb-patches/2004-02/msg00882.html > the conversion was highly mechanical.. > > Tested on NetBSD/PPC (which gets less failures) and GNU/Linux 32x64-bit > and 64-bit (which get the same results). Mostly okay. Just a few nits... > +static const struct frame_unwind * > +ppc_linux_sigtramp_sniffer (struct frame_info *next_frame) > +{ > + struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (next_frame)); > + if (frame_pc_unwind (next_frame) > + > frame_unwind_register_unsigned (next_frame, SP_REGNUM)) > + /* Assume anything that is vaguely on the stack is a signal > + trampoline. */ > + return &ppc_linux_sigtramp_unwind; > + else > + return NULL; > +} The test in the code above should be augmented with a call to ppc_linux_at_sigtramp_return_path(). We should not assume that only signal trampolines will be found when pc > sp. There could be other executable code above the stack. > static void > ppc_linux_init_abi (struct gdbarch_info info, > struct gdbarch *gdbarch) > @@ -1051,6 +1157,7 @@ > PowerOpen struct convention. */ > set_gdbarch_return_value (gdbarch, ppc_linux_return_value); > > +#if 0 > /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding > *_push_arguments(). The same remarks hold for the methods below. */ > set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); > @@ -1061,9 +1168,11 @@ > ppc_linux_frame_init_saved_regs); > set_gdbarch_deprecated_init_extra_frame_info (gdbarch, > ppc_linux_init_extra_frame_info); > +#endif Is there any reason to retain this #if 0'd code? If not, just delete it. Kevin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18235 invoked by alias); 2 Mar 2004 23:01:08 -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 18226 invoked from network); 2 Mar 2004 23:01:07 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 2 Mar 2004 23:01:07 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i22N17b14226 for ; Tue, 2 Mar 2004 18:01:07 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i22N16803969 for ; Tue, 2 Mar 2004 18:01:06 -0500 Received: from localhost.localdomain (vpn50-15.rdu.redhat.com [172.16.50.15]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i22N16J5005786 for ; Tue, 2 Mar 2004 18:01:06 -0500 Received: from saguaro (saguaro.lan [192.168.64.2]) by localhost.localdomain (8.12.10/8.12.10) with SMTP id i22N10cG015864 for ; Tue, 2 Mar 2004 16:01:00 -0700 Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Kevin Buettner To: gdb-patches@sources.redhat.com Subject: Re: [rfa:rs6000] Framefy rs6000 (and GNU/Linux PPC) Message-ID: <20040302160100.573bbadc@saguaro> In-Reply-To: <40428F53.5080502@gnu.org> References: <40428F53.5080502@gnu.org> Organization: Red Hat Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00034.txt.bz2 Message-ID: <20040319000900.riy-8ZLs5AGrHEEnW_s8WacduR_mzl0-kadx0I40T3Y@z> On Sun, 29 Feb 2004 20:18:11 -0500 Andrew Cagney wrote: > The attached updates the rs6000 so that (well for NetBSD, "elf" and > GNU/Linux 32+64) it uses the frame unwinder. It doesn't yet enable > dwarf2-cfi. > > Apart from the bug: Use right frame ID in step_over_function > http://sources.redhat.com/ml/gdb-patches/2004-02/msg00882.html > the conversion was highly mechanical.. > > Tested on NetBSD/PPC (which gets less failures) and GNU/Linux 32x64-bit > and 64-bit (which get the same results). Mostly okay. Just a few nits... > +static const struct frame_unwind * > +ppc_linux_sigtramp_sniffer (struct frame_info *next_frame) > +{ > + struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (next_frame)); > + if (frame_pc_unwind (next_frame) > + > frame_unwind_register_unsigned (next_frame, SP_REGNUM)) > + /* Assume anything that is vaguely on the stack is a signal > + trampoline. */ > + return &ppc_linux_sigtramp_unwind; > + else > + return NULL; > +} The test in the code above should be augmented with a call to ppc_linux_at_sigtramp_return_path(). We should not assume that only signal trampolines will be found when pc > sp. There could be other executable code above the stack. > static void > ppc_linux_init_abi (struct gdbarch_info info, > struct gdbarch *gdbarch) > @@ -1051,6 +1157,7 @@ > PowerOpen struct convention. */ > set_gdbarch_return_value (gdbarch, ppc_linux_return_value); > > +#if 0 > /* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding > *_push_arguments(). The same remarks hold for the methods below. */ > set_gdbarch_deprecated_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); > @@ -1061,9 +1168,11 @@ > ppc_linux_frame_init_saved_regs); > set_gdbarch_deprecated_init_extra_frame_info (gdbarch, > ppc_linux_init_extra_frame_info); > +#endif Is there any reason to retain this #if 0'd code? If not, just delete it. Kevin