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]

[PATCH] Fix phantom frames on ppc


On ppc the DWARF2 register 64 is the cr register.  But
rs6000_dwarf2_reg_to_regnum failed to translate that to the gdb internal
cr register number, causing it to be mistaken as the gdb internal pc
register.  This resulted in phantom frames whenever a frame has the cr
register saved.

Andreas.

2007-04-01  Andreas Schwab  <schwab@suse.de>

	* rs6000-tdep.c (rs6000_dwarf2_reg_to_regnum): Decode 64 as CR
	register.

--- gdb/rs6000-tdep.c.~1.269.~	2007-04-01 21:23:44.000000000 +0200
+++ gdb/rs6000-tdep.c	2007-04-01 21:24:17.000000000 +0200
@@ -2274,6 +2274,8 @@ rs6000_dwarf2_reg_to_regnum (int num)
   else
     switch (num)
       {
+      case 64:
+	return tdep->ppc_cr_regnum;
       case 67:
         return tdep->ppc_vrsave_regnum - 1; /* vscr */
       case 99:

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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