diff options
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index bc086e1..7d96884 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -433,9 +433,12 @@ arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr) { struct bound_minimal_symbol sym; char type; - arm_displaced_step_copy_insn_closure *dsc - = ((arm_displaced_step_copy_insn_closure * ) - get_displaced_step_copy_insn_closure_by_addr (memaddr)); + arm_displaced_step_copy_insn_closure *dsc = nullptr; + + if (gdbarch_displaced_step_copy_insn_closure_by_addr_p (gdbarch)) + dsc = ((arm_displaced_step_copy_insn_closure * ) + gdbarch_displaced_step_copy_insn_closure_by_addr + (gdbarch, current_inferior (), memaddr)); /* If checking the mode of displaced instruction in copy area, the mode should be determined by instruction on the original address. */ |