* dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref.
authorJakub Jelinek <jakub@redhat.com>
Wed, 22 Jun 2011 15:03:19 +0000 (15:03 +0000)
committerJakub Jelinek <jakub@redhat.com>
Wed, 22 Jun 2011 15:03:19 +0000 (15:03 +0000)
* dwarf.c (decode_location_expression): For DW_OP_GNU_convert and
DW_OP_GNU_reinterpret, if uvalue is 0, don't add cu_offset.
Handle DW_OP_GNU_parameter_ref.

binutils/ChangeLog
binutils/dwarf.c
include/ChangeLog
include/dwarf2.h

index 29563e1163347b895aee638597db6e9515ddcb10..edb87600c5412857a945bf32b6aeb19d8a23df80 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-22  Jakub Jelinek  <jakub@redhat.com>
+
+       * dwarf.c (decode_location_expression): For DW_OP_GNU_convert and
+       DW_OP_GNU_reinterpret, if uvalue is 0, don't add cu_offset.
+       Handle DW_OP_GNU_parameter_ref.
+
 2011-06-16  Tom Tromey  <tromey@redhat.com>
 
        * dwarf-mode.el (dwarf-do-insert-substructure): Call
index 46c454adf688c1d7c67cb782dfe395faca7e8e9c..f5a8d7bf17eaf83ce4e68c0d558b7ea3e997e6c0 100644 (file)
@@ -1179,13 +1179,18 @@ decode_location_expression (unsigned char * data,
          uvalue = read_leb128 (data, &bytes_read, 0);
          data += bytes_read;
          printf ("DW_OP_GNU_convert <0x%s>",
-                 dwarf_vmatoa ("x", cu_offset + uvalue));
+                 dwarf_vmatoa ("x", uvalue ? cu_offset + uvalue : 0));
          break;
        case DW_OP_GNU_reinterpret:
          uvalue = read_leb128 (data, &bytes_read, 0);
          data += bytes_read;
          printf ("DW_OP_GNU_reinterpret <0x%s>",
-                 dwarf_vmatoa ("x", cu_offset + uvalue));
+                 dwarf_vmatoa ("x", uvalue ? cu_offset + uvalue : 0));
+         break;
+       case DW_OP_GNU_parameter_ref:
+         printf ("DW_OP_GNU_parameter_ref: <0x%s>",
+                 dwarf_vmatoa ("x", cu_offset + byte_get (data, 4)));
+         data += 4;
          break;
 
          /* HP extensions.  */
index 6ff56e6b065f3371dc83cc7a7df5e410e6023ceb..83c7bcee9095eee99cec39b84da8b8ecfad095c6 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-22  Jakub Jelinek  <jakub@redhat.com>
+
+       * dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref.
+
 2011-06-20  Jakub Jelinek  <jakub@redhat.com>
 
        PR ld/12570
index 0b008661f964d672de61eb38dad8003e46718825..b2806ef78c9083abfe3762e86d7a3a5fedaa8b76 100644 (file)
@@ -563,6 +563,8 @@ enum dwarf_location_atom
     DW_OP_GNU_deref_type = 0xf6,
     DW_OP_GNU_convert = 0xf7,
     DW_OP_GNU_reinterpret = 0xf9,
+    /* The GNU parameter ref extension.  */
+    DW_OP_GNU_parameter_ref = 0xfa,
     /* HP extensions.  */
     DW_OP_HP_unknown     = 0xe0, /* Ouch, the same as GNU_push_tls_address.  */
     DW_OP_HP_is_value    = 0xe1,