summaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-05-14 13:46:37 -0600
committerJan Kratochvil <jan.kratochvil@redhat.com>2014-12-12 22:24:17 +0100
commit4ff709eb44e13fee683f01184a490e4fcc5c2862 (patch)
tree4f399320a22d4fc65b117272357af46c123a0eb9 /gdb/testsuite/lib
parenta92a2e3435f9f579365424fb95d5e07cbd4c4ffd (diff)
downloadbinutils-gdb-4ff709eb44e13fee683f01184a490e4fcc5c2862.tar.gz
add some missing ops to DWARF assembler
This changes the DWARF assembler to allow comments in a location expression, and also adds support for a few new opcodes I needed. gdb/testsuite/ChangeLog 2014-12-12 Tom Tromey <tromey@redhat.com> * lib/dwarf.exp (_location): Ignore blank lines. Allow comments. Handle DW_OP_pick, DW_OP_skip, DW_OP_bra.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/dwarf.exp9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 778ad1cf797..72153ece64c 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -803,7 +803,8 @@ namespace eval Dwarf {
variable _cu_offset_size
foreach line [split $body \n] {
- if {[lindex $line 0] == ""} {
+ # Ignore blank lines, and allow embedded comments.
+ if {[lindex $line 0] == "" || [regexp -- {^[ \t]*#} $line]} {
continue
}
set opcode [_map_name [lindex $line 0] _OP]
@@ -814,6 +815,7 @@ namespace eval Dwarf {
_op .${_cu_addr_size}byte [lindex $line 1]
}
+ DW_OP_pick -
DW_OP_const1u -
DW_OP_const1s {
_op .byte [lindex $line 1]
@@ -854,6 +856,11 @@ namespace eval Dwarf {
_op .uleb128 [lindex $line 2]
}
+ DW_OP_skip -
+ DW_OP_bra {
+ _op .2byte [lindex $line 1]
+ }
+
DW_OP_GNU_implicit_pointer {
if {[llength $line] != 3} {
error "usage: DW_OP_GNU_implicit_pointer LABEL OFFSET"