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] Correctly find PC in %eax if appropriate


This is pretty analogous to the patch that changed the REG_SAVED_REG
rule in the DWARF CFI unwinder.

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* i386-tdep.c (i386_frame_prev_register): Use
	frame_register_unwind to unwind I386_EAX_REGNUM when that's where
	the PC lives.

 
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.138.2.6
diff -u -p -r1.138.2.6 i386-tdep.c
--- i386-tdep.c 4 May 2003 22:00:09 -0000 1.138.2.6
+++ i386-tdep.c 5 May 2003 16:17:45 -0000
@@ -819,15 +819,8 @@ i386_frame_prev_register (struct frame_i
 
   if (regnum == I386_EIP_REGNUM && cache->pc_in_eax)
     {
-      *optimizedp = 0;
-      *lvalp = lval_register;
-      *addrp = 0;
-      *realnump = I386_EAX_REGNUM; /* %eax */
-      if (valuep)
-	{
-	  /* Read the value from the register.  */
-	  frame_unwind_register (next_frame, 0, valuep);
-	}
+      frame_register_unwind (next_frame, I386_EAX_REGNUM,
+			     optimizedp, lvalp, addrp, realnump, valuep);
       return;
     }
 


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