This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Add support for DW_OP_{implicit,stack}_value
- From: Jakub Jelinek <jakub at redhat dot com>
- To: binutils at sources dot redhat dot com
- Cc: tromey at redhat dot com
- Date: Thu, 2 Jul 2009 19:06:23 +0200
- Subject: [PATCH] Add support for DW_OP_{implicit,stack}_value
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
When inspecting branches/var-tracking-assignments-branch
compiled sources, it is better when readelf prints the new opcodes
properly.
Ok for trunk?
2009-07-02 Jakub Jelinek <jakub@redhat.com>
* dwarf2.h (enum dwarf_location_atom): Add DW_OP_implicit_value
and DW_OP_stack_value.
* dwarf.c (decode_location_expression): Handle DW_OP_stack_value
and DW_OP_implicit_value.
--- include/elf/dwarf2.h.jj 2009-05-28 19:35:20.000000000 +0200
+++ include/elf/dwarf2.h 2009-07-02 15:21:36.000000000 +0200
@@ -541,6 +541,9 @@ enum dwarf_location_atom
DW_OP_form_tls_address = 0x9b,
DW_OP_call_frame_cfa = 0x9c,
DW_OP_bit_piece = 0x9d,
+ /* DWARF 4 extensions. */
+ DW_OP_implicit_value = 0x9e,
+ DW_OP_stack_value = 0x9f,
/* GNU extensions. */
DW_OP_GNU_push_tls_address = 0xe0,
DW_OP_GNU_uninit = 0xf0,
--- binutils/dwarf.c.jj 2009-06-26 21:47:13.000000000 +0200
+++ binutils/dwarf.c 2009-07-02 15:31:44.000000000 +0200
@@ -1014,6 +1014,19 @@ decode_location_expression (unsigned cha
data += bytes_read;
break;
+ /* DWARF 4 extensions. */
+ case DW_OP_stack_value:
+ printf ("DW_OP_stack_value");
+ break;
+
+ case DW_OP_implicit_value:
+ printf ("DW_OP_implicit_value");
+ uvalue = read_leb128 (data, &bytes_read, 0);
+ data += bytes_read;
+ display_block (data, uvalue);
+ data += uvalue;
+ break;
+
/* GNU extensions. */
case DW_OP_GNU_push_tls_address:
printf ("DW_OP_GNU_push_tls_address or DW_OP_HP_unknown");
Jakub