This is the mail archive of the gdb-patches@sources.redhat.com 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]

[PATCH/i386newframe] Fix REG_SAVED_REG register rule


Andrew pointed out a problem with the old implementation, which made
me realise that we should really recursively lookup the value of a
register.  This patches fixes it (without a FALLTHROUGH :-)).

Checked in.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* dwarf-frame.c (dwarf_frame_prev_register): For the REG_SAVED_REG
	rule, simply call frame_register_unwind.

Index: dwarf-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/Attic/dwarf-frame.c,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 dwarf-frame.c
--- dwarf-frame.c 4 May 2003 22:00:09 -0000 1.1.2.1
+++ dwarf-frame.c 5 May 2003 16:07:28 -0000
@@ -558,15 +558,9 @@ dwarf_frame_prev_register (struct frame_
       break;
 
     case REG_SAVED_REG:
-      *optimizedp = 0;
-      *lvalp = lval_register;
-      *addrp = 0;
-      *realnump = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg);
-      if (valuep)
-	{
-	  /* Read the value from the register.  */
-	  frame_unwind_register (next_frame, *realnump, valuep);
-	}
+      regnum = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg);
+      frame_register_unwind (next_frame, regnum,
+			     optimizedp, lvalp, addrp, realnump, valuep);
       break;
 
     case REG_UNMODIFIED:


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