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] Fix some hppa64 unwinding problems


Do'h, looks like I wrote some code that wasn't 64-bit safe.  This
fixes quite a few:

   Cannot find bounds of current function (@0x0), unwinding will fail.

problems.  Down to 462 (from 752) unexpected failures in the
testsuite.  Yeah!

Obviously committed,

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* hppa-tdep.c (hppa_frame_prev_register_helper): Make 64-bit safe.

Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.197
diff -u -p -r1.197 hppa-tdep.c
--- hppa-tdep.c 21 Dec 2004 22:06:40 -0000 1.197
+++ hppa-tdep.c 21 Dec 2004 22:47:29 -0000
@@ -2622,18 +2622,21 @@ hppa_frame_prev_register_helper (struct 
 				 enum lval_type *lvalp, CORE_ADDR *addrp,
 				 int *realnump, void *valuep)
 {
+  struct gdbarch *arch = get_frame_arch (next_frame);
+
   if (regnum == HPPA_PCOQ_TAIL_REGNUM)
     {
       if (valuep)
 	{
+	  int size = register_size (arch, HPPA_PCOQ_HEAD_REGNUM);
 	  CORE_ADDR pc;
 
 	  trad_frame_get_prev_register (next_frame, saved_regs,
 					HPPA_PCOQ_HEAD_REGNUM, optimizedp,
 					lvalp, addrp, realnump, valuep);
 
-	  pc = extract_unsigned_integer (valuep, 4);
-	  store_unsigned_integer (valuep, 4, pc + 4);
+	  pc = extract_unsigned_integer (valuep, size);
+	  store_unsigned_integer (valuep, size, pc + 4);
 	}
 
       /* It's a computed value.  */
@@ -2652,10 +2655,7 @@ hppa_frame_prev_register_helper (struct 
   if (regnum == HPPA_FLAGS_REGNUM)
     {
       if (valuep)
-	store_unsigned_integer (valuep, 
-			        register_size (get_frame_arch (next_frame), 
-					       regnum), 
-				0);
+	store_unsigned_integer (valuep, register_size (arch, regnum), 0);
 
       /* It's a computed value.  */
       *optimizedp = 0;




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