This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: mips-tdep.c: Fix retrieval of the virtual frame pointer
- From: "Maciej W. Rozycki" <macro at mips dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: gdb-patches at sourceware dot org, Chris Dearman <chris at mips dot com>, "Maciej W. Rozycki" <macro at linux-mips dot org>
- Date: Fri, 28 Sep 2007 19:13:47 +0100 (BST)
- Subject: Re: mips-tdep.c: Fix retrieval of the virtual frame pointer
- References: <Pine.LNX.4.61.0709281818470.670@perivale.mips.com> <20070928175657.GA20487@caradoc.them.org>
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