ARM: extract_arm_insn function need to read instrs correctly in be8 case
authorVictor Kamensky <victor.kamensky@linaro.org>
Sun, 2 Nov 2014 21:28:35 +0000 (13:28 -0800)
committerVictor Kamensky <victor.kamensky@linaro.org>
Sun, 2 Nov 2014 21:29:45 +0000 (13:29 -0800)
extract_arm_insn function needs to read instructions in
gdbarch_byte_order_for_code byte order, because in case armv7b,
even data is big endian, instructions are still little endian.
Currently function uses gdbarch_byte_order which would be
big endian in armv7b case.

Because of this issue pretty much all gdb.reverse/ tests are
failing with 'Process record does not support instruction' message.

Fix is to change gdbarch_byte_order to gdbarch_byte_order_for_code,
when passed to extract_unsigned_integer that reads instruction.

gdb/ChangeLog:

2014-11-02  Victor Kamensky  <victor.kamensky@linaro.org>

* arm-tdep.c (extract_arm_insn): Use
gdbarch_byte_order_for_code to read arm instruction.

gdb/arm-tdep.c

index 43520cc23a304aad64eb73f5dd724792243aa8fd..9e632a7609108588889d5f3f50213f4a55836564 100644 (file)
@@ -13811,7 +13811,7 @@ extract_arm_insn (insn_decode_record *insn_record, uint32_t insn_size)
     return 1;
   insn_record->arm_insn = (uint32_t) extract_unsigned_integer (&buf[0],
                            insn_size, 
-                           gdbarch_byte_order (insn_record->gdbarch));
+                          gdbarch_byte_order_for_code (insn_record->gdbarch));
   return 0;
 }
 
This page took 0.031871 seconds and 4 git commands to generate.