diff options
author | Taimoor Mirza <tmirza@codesourcery.com> | 2014-05-16 11:39:05 +0500 |
---|---|---|
committer | Taimoor Mirza <tmirza@codesourcery.com> | 2014-05-16 11:39:05 +0500 |
commit | cac395eae4d97d9f59c5e588e4e662f2ae6cdfeb (patch) | |
tree | 22eac57ebc57ec2d48fec06805964f6a4959fed0 /gdb/arm-tdep.c | |
parent | 791849751dd82722d4cfaae844e1fdbed445af5a (diff) | |
download | gdb-cac395eae4d97d9f59c5e588e4e662f2ae6cdfeb.zip gdb-cac395eae4d97d9f59c5e588e4e662f2ae6cdfeb.tar.gz gdb-cac395eae4d97d9f59c5e588e4e662f2ae6cdfeb.tar.bz2 |
Fix prologue analysis for ldr.w and ldrd instruction
Prologue analysis for ldr.w and ldrd instruction obtains offset from
first two bytes that contains opcode of instruction. It should obtain
offset from next two bytes that actually contain operands.
* arm-tdep.c (thumb_analyze_prologue): Fix offset calculation for
ldr.w and ldrd instructions.
Signed-off-by: Taimoor Mirza <tmirza@codesourcery.com>
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index e3b1c3d..7271777 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1071,7 +1071,7 @@ thumb_analyze_prologue (struct gdbarch *gdbarch, unsigned int constant; CORE_ADDR loc; - offset = bits (insn, 0, 11); + offset = bits (inst2, 0, 11); if (insn & 0x0080) loc = start + 4 + offset; else @@ -1087,7 +1087,7 @@ thumb_analyze_prologue (struct gdbarch *gdbarch, unsigned int constant; CORE_ADDR loc; - offset = bits (insn, 0, 7) << 2; + offset = bits (inst2, 0, 7) << 2; if (insn & 0x0080) loc = start + 4 + offset; else |