mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-05 06:23:58 +08:00
Read instruction with byte_order_for_code
When reading instruction, we should use byte_order_for_code instead of byte_order. gdb: 2016-01-13 Yao Qi <yao.qi@linaro.org> * arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Use byte_order_for_code to read instruction.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2016-01-13 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
|
* arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Use
|
||||||
|
byte_order_for_code to read instruction.
|
||||||
|
|
||||||
2016-01-13 Pedro Alves <palves@redhat.com>
|
2016-01-13 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* NEWS: Mention $_gthread.
|
* NEWS: Mention $_gthread.
|
||||||
|
@ -644,6 +644,7 @@ static VEC (CORE_ADDR) *
|
|||||||
arm_get_next_pcs_raw (struct arm_get_next_pcs *self, CORE_ADDR pc)
|
arm_get_next_pcs_raw (struct arm_get_next_pcs *self, CORE_ADDR pc)
|
||||||
{
|
{
|
||||||
int byte_order = self->byte_order;
|
int byte_order = self->byte_order;
|
||||||
|
int byte_order_for_code = self->byte_order_for_code;
|
||||||
unsigned long pc_val;
|
unsigned long pc_val;
|
||||||
unsigned long this_instr = 0;
|
unsigned long this_instr = 0;
|
||||||
unsigned long status;
|
unsigned long status;
|
||||||
@ -652,7 +653,7 @@ arm_get_next_pcs_raw (struct arm_get_next_pcs *self, CORE_ADDR pc)
|
|||||||
VEC (CORE_ADDR) *next_pcs = NULL;
|
VEC (CORE_ADDR) *next_pcs = NULL;
|
||||||
|
|
||||||
pc_val = (unsigned long) pc;
|
pc_val = (unsigned long) pc;
|
||||||
this_instr = self->ops->read_mem_uint (pc, 4, byte_order);
|
this_instr = self->ops->read_mem_uint (pc, 4, byte_order_for_code);
|
||||||
|
|
||||||
status = regcache_raw_get_unsigned (regcache, ARM_PS_REGNUM);
|
status = regcache_raw_get_unsigned (regcache, ARM_PS_REGNUM);
|
||||||
nextpc = (CORE_ADDR) (pc_val + 4); /* Default case */
|
nextpc = (CORE_ADDR) (pc_val + 4); /* Default case */
|
||||||
|
Reference in New Issue
Block a user