aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-05-13 18:42:48 +0000
committerTom Tromey <tromey@redhat.com>2011-05-13 18:42:48 +0000
commit06826322cb4f08925577babb026bccea870b7b12 (patch)
treeedda8964a08e868442a979baa904b2df2fcbbd7f
parent05272e115a3b5fa8feebffcaf3c73d41650ec559 (diff)
downloadgdb-06826322cb4f08925577babb026bccea870b7b12.zip
gdb-06826322cb4f08925577babb026bccea870b7b12.tar.gz
gdb-06826322cb4f08925577babb026bccea870b7b12.tar.bz2
* dwarf2loc.c (disassemble_dwarf_expression): Fix instruction
offset display.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2loc.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 65d92b5..4ee52d5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-13 Tom Tromey <tromey@redhat.com>
+
+ * dwarf2loc.c (disassemble_dwarf_expression): Fix instruction
+ offset display.
+
2011-05-13 Doug Evans <dje@google.com>
* linux-nat.c (debug_linux_nat_async): Delete.
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 64cc5e5..9afb186 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -2364,8 +2364,8 @@ disassemble_dwarf_expression (struct ui_file *stream,
if (!name)
error (_("Unrecognized DWARF opcode 0x%02x at %ld"),
- op, (long) (data - start));
- fprintf_filtered (stream, " % 4ld: %s", (long) (data - start), name);
+ op, (long) (data - 1 - start));
+ fprintf_filtered (stream, " % 4ld: %s", (long) (data - 1 - start), name);
switch (op)
{