This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 03/14] add some missing ops to DWARF assembler
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Fri, 16 May 2014 09:26:24 -0600
- Subject: [PATCH 03/14] add some missing ops to DWARF assembler
- Authentication-results: sourceware.org; auth=none
- References: <1400253995-12333-1-git-send-email-tromey at redhat dot com>
This changes the DWARF assembler to allow comments in a location
expression, and also adds support for a few new opcodes I needed.
2014-05-16 Tom Tromey <tromey@redhat.com>
* lib/dwarf.exp (_location): Ignore blank lines. Allow comments.
Handle DW_OP_pick, DW_OP_skip, DW_OP_bra.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/lib/dwarf.exp | 9 ++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 1483271..eac2c80 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -678,7 +678,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]
@@ -689,6 +690,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]
@@ -729,6 +731,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"
--
1.9.0