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]

Re: mips-tdep.c: Fix retrieval of the virtual frame pointer


On Fri, Sep 28, 2007 at 06:46:19PM +0100, Maciej W. Rozycki wrote:
> Hello,
> 
>  A number of test cases in the gdb.trace/ subset fail with an error like 
> this:

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.

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:

> +  if (gdbarch_deprecated_fp_regnum (current_gdbarch) >= 0)

> +  else if (MIPS_SP_REGNUM >= 0)

are both constants for MIPS.

-- 
Daniel Jacobowitz
CodeSourcery


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