Share enum arm_breakpoint_kinds
authorYao Qi <yao.qi@linaro.org>
Mon, 10 Oct 2016 10:11:25 +0000 (11:11 +0100)
committerYao Qi <yao.qi@linaro.org>
Mon, 10 Oct 2016 10:11:25 +0000 (11:11 +0100)
This patch shares "enum arm_breakpoint_kinds", and use ARM_BP_KIND_THUMB2
in GDB.

gdb:

2016-10-10  Yao Qi  <yao.qi@linaro.org>

* 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  <yao.qi@linaro.org>

* linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.

gdb/ChangeLog
gdb/arch/arm.h
gdb/arm-tdep.c
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-aarch32-low.c

index aac2b4b40fbb1dfa8d9e72e4cb0d7b998035527e..5664a500b18286c8373a5fc6ab4332207992fe99 100644 (file)
@@ -1,3 +1,9 @@
+2016-10-10  Yao Qi  <yao.qi@linaro.org>
+
+       * 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  <yao.qi@linaro.org>
 
        * m32c-tdep.c (m32c_gdbarch_init): Rename local 'arch' by
index fcde3d0e413f86729bf33c01c2173d9c6712cc99..8d9c34eeae4d941e88032e8ecfd6dfc2f9a96bfa 100644 (file)
@@ -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
index 4211cd5e3e71d7e4955019dcc1d00363922afaef..27a3ebe1722f0904146e6d0c0313c6d026bc7984 100644 (file)
@@ -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
index 371431b183a4e0c9a7af51688586d90bb6bd065b..1064fcfa31e240afcaf0620a840fa907fabebd44 100644 (file)
@@ -1,3 +1,7 @@
+2016-10-10  Yao Qi  <yao.qi@linaro.org>
+
+       * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
+
 2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * target.c (target_supports_multi_process): New function, moved
index 463bce65172733b9126a1080bd5b2cf67da1342a..5547cf64914f2eae2bb89c44e3ea7165f318a246 100644 (file)
@@ -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