From: Kevin Buettner Date: Mon, 30 Jul 2018 23:15:34 +0000 (-0700) Subject: Add support of DW_OP_GNU_variable_value to DWARF assembler X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae3a7c47e6a95d69a09838c11f9fd3c9cbb25cb6;p=binutils-gdb.git Add support of DW_OP_GNU_variable_value to DWARF assembler gdb/testsuite/ChangeLog: * lib/dwarf.exp: Add support for DW_OP_GNU_variable_value. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 705e5f07b90..848cb65f369 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-08-18 Kevin Buettner + + * lib/dwarf.exp: Add support for DW_OP_GNU_variable_value. + 2018-08-17 Alan Hayward PR gdb/18931 diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index 82ec29b57dc..0c3f50a0388 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -962,6 +962,20 @@ namespace eval Dwarf { _op .sleb128 [lindex $line 2] } + DW_OP_GNU_variable_value { + if {[llength $line] != 2} { + error "usage: $opcode LABEL" + } + + # Here label is a section offset. + set label [lindex $line 1] + if { $_cu_version == 2 } { + _op .${_cu_addr_size}byte $label + } else { + _op .${_cu_offset_size}byte $label + } + } + DW_OP_deref_size { if {[llength $line] != 2} { error "usage: DW_OP_deref_size SIZE"