From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3792 invoked by alias); 28 Sep 2007 18:14:01 -0000 Received: (qmail 3783 invoked by uid 22791); 28 Sep 2007 18:13:59 -0000 X-Spam-Check-By: sourceware.org Received: from dmz.mips-uk.com (HELO dmz.mips-uk.com) (194.74.144.194) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Sep 2007 18:13:55 +0000 Received: from internal-mx1 ([192.168.192.240] helo=ukservices1.mips.com) by dmz.mips-uk.com with esmtp (Exim 3.35 #1 (Debian)) id 1IbKLX-0000zM-00; Fri, 28 Sep 2007 19:13:51 +0100 Received: from perivale.mips.com ([192.168.192.200]) by ukservices1.mips.com with esmtp (Exim 3.36 #1 (Debian)) id 1IbKLT-00068Y-00; Fri, 28 Sep 2007 19:13:47 +0100 Received: from macro (helo=localhost) by perivale.mips.com with local-esmtp (Exim 4.63) (envelope-from ) id 1IbKLT-0002eH-N7; Fri, 28 Sep 2007 19:13:47 +0100 Date: Fri, 28 Sep 2007 18:14:00 -0000 From: "Maciej W. Rozycki" To: Daniel Jacobowitz cc: gdb-patches@sourceware.org, Chris Dearman , "Maciej W. Rozycki" Subject: Re: mips-tdep.c: Fix retrieval of the virtual frame pointer In-Reply-To: <20070928175657.GA20487@caradoc.them.org> Message-ID: References: <20070928175657.GA20487@caradoc.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MIPS-Technologies-UK-MailScanner: Found to be clean X-MIPS-Technologies-UK-MailScanner-From: macro@mips.com Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00422.txt.bz2 On Fri, 28 Sep 2007, Daniel Jacobowitz wrote: > Have I mentioned that I have queued patches I haven't gotten to yet? > :-) I spent the past two weeks fighting with an obstinate qemu, and > one of the patches I was testing was basically this one. I see... > Mine was: > > +/* Dummy virtual frame pointer method. This is no more or less accurate > + than most other architectures; we just need to be explicit about it, > + because the pseudo-register gdbarch_sp_regnum will otherwise lead to > + an assertion failure. */ > + > +static void > +mips_virtual_frame_pointer (CORE_ADDR pc, int *reg, LONGEST *offset) > +{ > + *reg = MIPS_SP_REGNUM; > + *offset = 0; > +} > > I think this is more accurate than yours, since these: You mean simpler? No argument. > > + if (gdbarch_deprecated_fp_regnum (current_gdbarch) >= 0) > > > + else if (MIPS_SP_REGNUM >= 0) > > are both constants for MIPS. Well, this may change in theory, but I know of no plans to do that, so shall I replace Chris's patch with yours and test it and you will commit it shortly? Maciej