From: Yao Qi Date: Mon, 10 Oct 2016 10:11:25 +0000 (+0100) Subject: Share enum arm_breakpoint_kinds X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a1078bea751d48e8846b91542d91647f1e0aed8d;p=binutils-gdb.git Share enum arm_breakpoint_kinds This patch shares "enum arm_breakpoint_kinds", and use ARM_BP_KIND_THUMB2 in GDB. gdb: 2016-10-10 Yao Qi * arch/arm.h (enum arm_breakpoint_kinds): New. * arm-tdep.c (arm_remote_breakpoint_from_pc): Use ARM_BP_KIND_THUMB2. gdb/gdbserver: 2016-10-10 Yao Qi * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aac2b4b40fb..5664a500b18 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-10-10 Yao Qi + + * arch/arm.h (enum arm_breakpoint_kinds): New. + * arm-tdep.c (arm_remote_breakpoint_from_pc): Use + ARM_BP_KIND_THUMB2. + 2016-10-10 Yao Qi * m32c-tdep.c (m32c_gdbarch_init): Rename local 'arch' by diff --git a/gdb/arch/arm.h b/gdb/arch/arm.h index fcde3d0e413..8d9c34eeae4 100644 --- a/gdb/arch/arm.h +++ b/gdb/arch/arm.h @@ -58,6 +58,14 @@ enum gdb_regnum { ARM_LAST_FP_ARG_REGNUM = ARM_F3_REGNUM }; +/* Enum describing the different kinds of breakpoints. */ +enum arm_breakpoint_kinds +{ + ARM_BP_KIND_THUMB = 2, + ARM_BP_KIND_THUMB2 = 3, + ARM_BP_KIND_ARM = 4, +}; + /* Instruction condition field values. */ #define INST_EQ 0x0 #define INST_NE 0x1 diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 4211cd5e3e7..27a3ebe1722 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -7900,7 +7900,7 @@ arm_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, if (arm_pc_is_thumb (gdbarch, *pcptr) && *kindptr == 4) /* The documented magic value for a 32-bit Thumb-2 breakpoint, so that this is not confused with a 32-bit ARM breakpoint. */ - *kindptr = 3; + *kindptr = ARM_BP_KIND_THUMB2; } /* Extract from an array REGBUF containing the (raw) register state a diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 371431b183a..1064fcfa31e 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2016-10-10 Yao Qi + + * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove. + 2016-10-06 Sergio Durigan Junior * target.c (target_supports_multi_process): New function, moved diff --git a/gdb/gdbserver/linux-aarch32-low.c b/gdb/gdbserver/linux-aarch32-low.c index 463bce65172..5547cf64914 100644 --- a/gdb/gdbserver/linux-aarch32-low.c +++ b/gdb/gdbserver/linux-aarch32-low.c @@ -219,14 +219,6 @@ arm_breakpoint_at (CORE_ADDR where) return 0; } -/* Enum describing the different kinds of breakpoints. */ -enum arm_breakpoint_kinds -{ - ARM_BP_KIND_THUMB = 2, - ARM_BP_KIND_THUMB2 = 3, - ARM_BP_KIND_ARM = 4, -}; - /* Implementation of linux_target_ops method "breakpoint_kind_from_pc". Determine the type and size of breakpoint to insert at PCPTR. Uses the