readelf updates for recent dwarf2 additions

Roland McGrath roland@redhat.com
Wed Sep 11 15:26:00 GMT 2002


These patches make readelf grok DW_OP_GNU_push_tls_address.  While I was
there I also changed calli to call_ref to synch up with the gcc dwarf2.h's
name for that constant.

(If someone would like to enable my sources account to access binutils,
I would be happy to do the commits myself after approval if that makes
anyone else's life easier.)


Enjoy,
Roland


include/elf/
2002-09-10  Roland McGrath  <roland@redhat.com>

	* dwarf2.h: Updates from GCC version of thie file:
	(enum dwarf_location_atom): DW_OP_calli -> DW_OP_call_ref.
	Add DW_OP_GNU_push_tls_address.
	(DW_OP_lo_user): Change to 0xe0.

binutils/
2002-09-10  Roland McGrath  <roland@redhat.com>

	* readelf.c (decode_location_expression): DW_OP_calli -> DW_OP_call_ref
	Handle DW_OP_GNU_push_tls_address.

--- binutils/readelf.c.~1~	Thu Aug  1 17:49:32 2002
+++ binutils/readelf.c	Wed Sep 11 13:19:33 2002
@@ -7338,7 +7338,7 @@ decode_location_expression (data, pointe
 	  printf ("DW_OP_nop");
 	  break;
 
-	  /* DWARF 2.1 extensions.  */
+	  /* DWARF 3 extensions.  */
 	case DW_OP_push_object_address:
 	  printf ("DW_OP_push_object_address");
 	  break;
@@ -7350,8 +7350,13 @@ decode_location_expression (data, pointe
 	  printf ("DW_OP_call4: <%lx>", (long) byte_get (data, 4));
 	  data += 4;
 	  break;
-	case DW_OP_calli:
-	  printf ("DW_OP_calli");
+	case DW_OP_call_ref:
+	  printf ("DW_OP_call_ref");
+	  break;
+
+	  /* GNU extensions.  */
+	case DW_OP_GNU_push_tls_address:
+	  printf ("DW_OP_GNU_push_tls_address");
 	  break;
 
 	default:
--- ./include/elf/dwarf2.h.~1~	Fri Jun  7 19:22:17 2002
+++ ./include/elf/dwarf2.h	Tue Sep 10 19:11:04 2002
@@ -488,11 +488,13 @@ enum dwarf_location_atom
     DW_OP_push_object_address = 0x97,
     DW_OP_call2 = 0x98,
     DW_OP_call4 = 0x99,
-    DW_OP_calli = 0x9a
-  };
+    DW_OP_call_ref = 0x9a,
+    /* GNU extensions.  */
+    DW_OP_GNU_push_tls_address = 0xe0
 
-#define DW_OP_lo_user	0x80	/* Implementation-defined range start.  */
+#define DW_OP_lo_user	0xe0	/* Implementation-defined range start.  */
 #define DW_OP_hi_user	0xff	/* Implementation-defined range end.  */
+  };
 
 /* Type encodings.  */
 enum dwarf_type



More information about the Binutils mailing list