From 4db71c0b79ff7e89a392f903f39251faa795d69c Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Wed, 2 Mar 2011 05:33:37 +0000 Subject: 2011-03-02 Yao Qi * arm-tdep.h (struct displaced_step_closure): Add two new fields is_thumb and insn_size. * arm-tdep.c (displaced_read_reg): Adjust correct pipeline offset on both ARM and Thumb mode. (arm_process_displaced_insn): Set is_thumb and insn_size. (arm_displaced_init_closure): Handle both 16-bit and 32-bit. (arm_displaced_step_fixup): Likewise. --- gdb/arm-tdep.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gdb/arm-tdep.h') diff --git a/gdb/arm-tdep.h b/gdb/arm-tdep.h index de3f6cc..362be2e 100644 --- a/gdb/arm-tdep.h +++ b/gdb/arm-tdep.h @@ -262,6 +262,17 @@ struct displaced_step_closure struct displaced_step_closure *dsc); } svc; } u; + + /* The size of original instruction, 2 or 4. */ + unsigned int insn_size; + /* True if the original insn (and thus all replacement insns) are Thumb + instead of ARM. */ + unsigned int is_thumb; + + /* The slots in the array is used in this way below, + - ARM instruction occupies one slot, + - Thumb 16 bit instruction occupies one slot, + - Thumb 32-bit instruction occupies *two* slots, one part for each. */ unsigned long modinsn[DISPLACED_MODIFIED_INSNS]; int numinsns; CORE_ADDR insn_addr; -- cgit v1.1