This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]