mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
2010-08-30 Yao Qi <yao@codesourcery.com>
* arm-linux-tdep.c (arm_linux_sigreturn_return_addr): New. (arm_linux_syscall_next_pc): New. (arm_linux_copy_svc): Use arm_linux_sigreturn_return_addr instead. (arm_linux_init_abi): Initialize syscall_next_pc. * arm-tdep.c (thumb_get_next_pc_raw): Get next pc of SWI in Thumb mode. (arm_get_next_pc_raw): Get next pc of SWI in ARM mode. * arm-tdep.h (struct gdbarch_tdep): Add a function pointer syscall_next_pc. Declare arm_frame_is_thumb.
This commit is contained in:
@ -270,7 +270,7 @@ arm_psr_thumb_bit (struct gdbarch *gdbarch)
|
||||
|
||||
/* Determine if FRAME is executing in Thumb mode. */
|
||||
|
||||
static int
|
||||
int
|
||||
arm_frame_is_thumb (struct frame_info *frame)
|
||||
{
|
||||
CORE_ADDR cpsr;
|
||||
@ -2828,7 +2828,16 @@ thumb_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||
else if ((inst1 & 0xf000) == 0xd000) /* conditional branch */
|
||||
{
|
||||
unsigned long cond = bits (inst1, 8, 11);
|
||||
if (cond != 0x0f && condition_true (cond, status)) /* 0x0f = SWI */
|
||||
if (cond == 0x0f) /* 0x0f = SWI */
|
||||
{
|
||||
struct gdbarch_tdep *tdep;
|
||||
tdep = gdbarch_tdep (gdbarch);
|
||||
|
||||
if (tdep->syscall_next_pc != NULL)
|
||||
nextpc = tdep->syscall_next_pc (frame);
|
||||
|
||||
}
|
||||
else if (cond != 0x0f && condition_true (cond, status))
|
||||
nextpc = pc_val + (sbits (inst1, 0, 7) << 1);
|
||||
}
|
||||
else if ((inst1 & 0xf800) == 0xe000) /* unconditional branch */
|
||||
@ -3277,7 +3286,16 @@ arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
|
||||
case 0xc:
|
||||
case 0xd:
|
||||
case 0xe: /* coproc ops */
|
||||
break;
|
||||
case 0xf: /* SWI */
|
||||
{
|
||||
struct gdbarch_tdep *tdep;
|
||||
tdep = gdbarch_tdep (gdbarch);
|
||||
|
||||
if (tdep->syscall_next_pc != NULL)
|
||||
nextpc = tdep->syscall_next_pc (frame);
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user