aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/dwarf.exp7
2 files changed, 11 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 4d19711..aa272e3 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-25 Yao Qi <yao.qi@linaro.org>
+
+ * lib/dwarf.exp (Dwarf::_location): Handle
+ DW_OP_GNU_implicit_pointer with proper size.
+
2017-01-20 Luis Machado <lgustavo@codesourcery.com>
* gdb.python/py-xmethods.exp: Fix test names starting with lowercase
diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
index 9f5fa6c..03ae637 100644
--- a/gdb/testsuite/lib/dwarf.exp
+++ b/gdb/testsuite/lib/dwarf.exp
@@ -840,6 +840,7 @@ namespace eval Dwarf {
proc _location {body} {
variable _constants
variable _cu_label
+ variable _cu_version
variable _cu_addr_size
variable _cu_offset_size
@@ -913,7 +914,11 @@ namespace eval Dwarf {
# Here label is a section offset.
set label [lindex $line 1]
- _op .${_cu_offset_size}byte $label
+ if { $_cu_version == 2 } {
+ _op .${_cu_addr_size}byte $label
+ } else {
+ _op .${_cu_offset_size}byte $label
+ }
_op .sleb128 [lindex $line 2]
}