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]

[hppa/commit] Synchronize unwind descriptor field names with documentation


Last December there was a discussion about improving how gdb prints
unwind descriptors in gdb - the following patch cleans up the structure
definition and gdb output so that they match the HP runtime
specification document (a copy of which is available at
http://ftp.parisc-linux.org/docs/arch/pa-runtime-32-SOM.pdf)

Compile tested on hppa2.0w-hp-hpux11.11, and committed.

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
2006-03-01  Randolph Chung  <tausq@debian.org>

	* hppa-tdep.h (unwind_table_entry): Update field names to match HP
	runtime specification.
	* hppa-tdep.c (internalize_unwinds, hppa_frame_cache): Likewise.
	(unwind_command): Likewise.

Index: hppa-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
retrieving revision 1.220
diff -u -p -r1.220 hppa-tdep.c
--- hppa-tdep.c	1 Mar 2006 05:22:38 -0000	1.220
+++ hppa-tdep.c	1 Mar 2006 05:38:41 -0000
@@ -280,7 +280,7 @@ internalize_unwinds (struct objfile *obj
 	  table[i].Millicode = (tmp >> 30) & 0x1;
 	  table[i].Millicode_save_sr0 = (tmp >> 29) & 0x1;
 	  table[i].Region_description = (tmp >> 27) & 0x3;
-	  table[i].reserved1 = (tmp >> 26) & 0x1;
+	  table[i].reserved = (tmp >> 26) & 0x1;
 	  table[i].Entry_SR = (tmp >> 25) & 0x1;
 	  table[i].Entry_FR = (tmp >> 21) & 0xf;
 	  table[i].Entry_GR = (tmp >> 16) & 0x1f;
@@ -290,23 +290,23 @@ internalize_unwinds (struct objfile *obj
 	  table[i].Frame_Extension_Millicode = (tmp >> 12) & 0x1;
 	  table[i].Stack_Overflow_Check = (tmp >> 11) & 0x1;
 	  table[i].Two_Instruction_SP_Increment = (tmp >> 10) & 0x1;
-	  table[i].Ada_Region = (tmp >> 9) & 0x1;
+	  table[i].sr4export = (tmp >> 9) & 0x1;
 	  table[i].cxx_info = (tmp >> 8) & 0x1;
 	  table[i].cxx_try_catch = (tmp >> 7) & 0x1;
 	  table[i].sched_entry_seq = (tmp >> 6) & 0x1;
-	  table[i].reserved2 = (tmp >> 5) & 0x1;
+	  table[i].reserved1 = (tmp >> 5) & 0x1;
 	  table[i].Save_SP = (tmp >> 4) & 0x1;
 	  table[i].Save_RP = (tmp >> 3) & 0x1;
 	  table[i].Save_MRP_in_frame = (tmp >> 2) & 0x1;
-	  table[i].extn_ptr_defined = (tmp >> 1) & 0x1;
+	  table[i].save_r19 = (tmp >> 1) & 0x1;
 	  table[i].Cleanup_defined = tmp & 0x1;
 	  tmp = bfd_get_32 (objfile->obfd, (bfd_byte *) buf);
 	  buf += 4;
 	  table[i].MPE_XL_interrupt_marker = (tmp >> 31) & 0x1;
 	  table[i].HP_UX_interrupt_marker = (tmp >> 30) & 0x1;
 	  table[i].Large_frame = (tmp >> 29) & 0x1;
-	  table[i].Pseudo_SP_Set = (tmp >> 28) & 0x1;
-	  table[i].reserved4 = (tmp >> 27) & 0x1;
+	  table[i].alloca_frame = (tmp >> 28) & 0x1;
+	  table[i].reserved2 = (tmp >> 27) & 0x1;
 	  table[i].Total_frame_size = tmp & 0x7ffffff;
 
 	  /* Stub unwinds are handled elsewhere. */
@@ -2065,11 +2065,11 @@ hppa_frame_cache (struct frame_info *nex
  
      fp = frame_unwind_register_unsigned (next_frame, HPPA_FP_REGNUM);
 
-     if (u->Pseudo_SP_Set)
+     if (u->alloca_frame)
        fp -= u->Total_frame_size << 3;
  
      if (frame_pc_unwind (next_frame) >= prologue_end
-         && (u->Save_SP || u->Pseudo_SP_Set) && fp != 0)
+         && (u->Save_SP || u->alloca_frame) && fp != 0)
       {
  	cache->base = fp;
  
@@ -2540,15 +2554,19 @@ unwind_command (char *exp, int from_tty)
   pif (Frame_Extension_Millicode);
   pif (Stack_Overflow_Check);
   pif (Two_Instruction_SP_Increment);
-  pif (Ada_Region);
+  pif (sr4export);
+  pif (cxx_info);
+  pif (cxx_try_catch);
+  pif (sched_entry_seq);
   pif (Save_SP);
   pif (Save_RP);
   pif (Save_MRP_in_frame);
-  pif (extn_ptr_defined);
+  pif (save_r19);
   pif (Cleanup_defined);
   pif (MPE_XL_interrupt_marker);
   pif (HP_UX_interrupt_marker);
   pif (Large_frame);
+  pif (alloca_frame);
 
   putchar_unfiltered ('\n');
 
Index: hppa-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/hppa-tdep.h,v
retrieving revision 1.25
diff -u -p -r1.25 hppa-tdep.h
--- hppa-tdep.h	20 Jan 2006 23:37:07 -0000	1.25
+++ hppa-tdep.h	1 Mar 2006 05:38:41 -0000
@@ -129,7 +129,7 @@ struct unwind_table_entry
     unsigned int Millicode:1;	/* 1 */
     unsigned int Millicode_save_sr0:1;	/* 2 */
     unsigned int Region_description:2;	/* 3..4 */
-    unsigned int reserved1:1;	/* 5 */
+    unsigned int reserved:1;	/* 5 */
     unsigned int Entry_SR:1;	/* 6 */
     unsigned int Entry_FR:4;	/* number saved *//* 7..10 */
     unsigned int Entry_GR:5;	/* number saved *//* 11..15 */
@@ -139,22 +139,22 @@ struct unwind_table_entry
     unsigned int Frame_Extension_Millicode:1;	/* 19 */
     unsigned int Stack_Overflow_Check:1;	/* 20 */
     unsigned int Two_Instruction_SP_Increment:1;	/* 21 */
-    unsigned int Ada_Region:1;	/* 22 */
+    unsigned int sr4export:1;	/* 22 */
     unsigned int cxx_info:1;	/* 23 */
     unsigned int cxx_try_catch:1;	/* 24 */
     unsigned int sched_entry_seq:1;	/* 25 */
-    unsigned int reserved2:1;	/* 26 */
+    unsigned int reserved1:1;	/* 26 */
     unsigned int Save_SP:1;	/* 27 */
     unsigned int Save_RP:1;	/* 28 */
     unsigned int Save_MRP_in_frame:1;	/* 29 */
-    unsigned int extn_ptr_defined:1;	/* 30 */
+    unsigned int save_r19:1;	/* 30 */
     unsigned int Cleanup_defined:1;	/* 31 */
 
     unsigned int MPE_XL_interrupt_marker:1;	/* 0 */
     unsigned int HP_UX_interrupt_marker:1;	/* 1 */
     unsigned int Large_frame:1;	/* 2 */
-    unsigned int Pseudo_SP_Set:1;	/* 3 */
-    unsigned int reserved4:1;	/* 4 */
+    unsigned int alloca_frame:1;	/* 3 */
+    unsigned int reserved2:1;	/* 4 */
     unsigned int Total_frame_size:27;	/* 5..31 */
 
     /* This is *NOT* part of an actual unwind_descriptor in an object

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