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] Fix for dwarf2-frame.c


I distilled this from the S/390 DWARF-2 CFI patch that Ulrich
submitted.  There's a real problem here and this fixes it.

Committed,

Mark


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

	From Ulrich Weigand  <weigand@informatik.uni-erlangen.de>:
	* dwarf2-frame.c (dwarf2_frame_cache): Use the untranslated RA
	column instead of translating it.

Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.22
diff -u -p -r1.22 dwarf2-frame.c
--- dwarf2-frame.c 2 Dec 2003 16:41:39 -0000 1.22
+++ dwarf2-frame.c 5 Dec 2003 21:09:43 -0000
@@ -618,14 +618,13 @@ dwarf2_frame_cache (struct frame_info *n
     }
   else
     {
-      int reg = DWARF2_REG_TO_REGNUM (fs->retaddr_column);
-      if (reg != PC_REGNUM)
+      if (DWARF2_REG_TO_REGNUM (fs->retaddr_column) != PC_REGNUM)
 	{
 	  /* See comment above about PC_REGNUM being negative.  If
 	     this assertion fails, it's a problem with this code and
 	     not the architecture.  */
 	  gdb_assert (PC_REGNUM >= 0);
-	  cache->reg[PC_REGNUM].loc.reg = reg;
+	  cache->reg[PC_REGNUM].loc.reg = fs->retaddr_column;
 	  cache->reg[PC_REGNUM].how = REG_SAVED_REG;
 	}
     }


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