This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFC] legacy_virtual_frame_pointer: SP_REGNUM might be a pseudo-register
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 7 May 2007 14:48:24 -0700
- Subject: [RFC] legacy_virtual_frame_pointer: SP_REGNUM might be a pseudo-register
Any comments on the patch below?
I found this change necessary to avoid internal errors in some gdb.trace
tests when running against the mips simulator.
* arch-utils.c (legacy_virtual_frame_pointer): SP_REGNUM might
be a pseudo-register; revise test accordingly.
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.145
diff -u -p -r1.145 arch-utils.c
--- arch-utils.c 28 Apr 2007 21:52:38 -0000 1.145
+++ arch-utils.c 7 May 2007 21:39:03 -0000
@@ -198,7 +198,7 @@ legacy_virtual_frame_pointer (CORE_ADDR
with things like Dwarf2's CFI. */
if (DEPRECATED_FP_REGNUM >= 0 && DEPRECATED_FP_REGNUM < NUM_REGS)
*frame_regnum = DEPRECATED_FP_REGNUM;
- else if (SP_REGNUM >= 0 && SP_REGNUM < NUM_REGS)
+ else if (SP_REGNUM >= 0 && SP_REGNUM < NUM_REGS + NUM_PSEUDO_REGS)
*frame_regnum = SP_REGNUM;
else
/* Should this be an internal error? I guess so, it is reflecting