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]

[commit] Eliminate return_pc from d10v


As pointed out by Ted, committed.

Andrew
2003-06-06  Andrew Cagney  <cagney@redhat.com>

	* d10v-tdep.c (struct d10v_unwind_cache): Delete "return_pc".
	(d10v_frame_unwind_cache): Do not set "return_pc".

Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.118
diff -u -r1.118 d10v-tdep.c
--- d10v-tdep.c	3 Jun 2003 18:53:37 -0000	1.118
+++ d10v-tdep.c	6 Jun 2003 21:24:27 -0000
@@ -563,7 +563,6 @@
 
 struct d10v_unwind_cache
 {
-  CORE_ADDR return_pc;
   /* The previous frame's inner most stack address.  Used as this
      frame ID's stack_addr.  */
   CORE_ADDR prev_sp;
@@ -682,7 +681,6 @@
   info->saved_regs = FRAME_OBSTACK_CALLOC (NUM_REGS, CORE_ADDR);
 
   info->size = 0;
-  info->return_pc = 0;
   info->sp_offset = 0;
 
   info->uses_frame = 0;
@@ -778,20 +776,6 @@
       {
 	info->saved_regs[i] = (info->prev_sp + info->saved_regs[i]);
       }
-
-  if (info->saved_regs[LR_REGNUM])
-    {
-      CORE_ADDR return_pc
-	= get_frame_memory_unsigned (next_frame, info->saved_regs[LR_REGNUM], 
-				     register_size (gdbarch, LR_REGNUM));
-      info->return_pc = d10v_make_iaddr (return_pc);
-    }
-  else
-    {
-      ULONGEST return_pc;
-      frame_unwind_unsigned_register (next_frame, LR_REGNUM, &return_pc);
-      info->return_pc = d10v_make_iaddr (return_pc);
-    }
 
   /* The D10V_SP_REGNUM is special.  Instead of the address of the SP, the
      previous frame's SP value is saved.  */

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