aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-11-03 14:35:14 +0000
committerYao Qi <yao.qi@linaro.org>2016-11-03 14:35:14 +0000
commita97c97e8d7c818886f0f7beb3fd5dee0042b4a07 (patch)
tree4f4bba9bf8b8f91f95af09e075c096ba59584c80
parent833b7ab5008b769dca6db6d5ee1d21d33e730132 (diff)
downloadgdb-a97c97e8d7c818886f0f7beb3fd5dee0042b4a07.zip
gdb-a97c97e8d7c818886f0f7beb3fd5dee0042b4a07.tar.gz
gdb-a97c97e8d7c818886f0f7beb3fd5dee0042b4a07.tar.bz2
Remove arm_override_mode
GDB can determine the kind of single step breakpoint by gdbarch breakpoint_kind_from_current_state, so global variable arm_override_mode is no longer needed. This patch removes it. gdb: 2016-11-03 Yao Qi <yao.qi@linaro.org> * arm-tdep.c (arm_override_mode): Remove. (arm_pc_is_thumb): Update. (arm_insert_single_step_breakpoint): Update.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/arm-tdep.c14
2 files changed, 6 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3482f71..b9b43d7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2016-11-03 Yao Qi <yao.qi@linaro.org>
+ * arm-tdep.c (arm_override_mode): Remove.
+ (arm_pc_is_thumb): Update.
+ (arm_insert_single_step_breakpoint): Update.
+
+2016-11-03 Yao Qi <yao.qi@linaro.org>
+
* arch-utils.c (default_breakpoint_kind_from_current_state):
New function.
* arch-utils.h (default_breakpoint_kind_from_current_state):
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 28fc20c..4a89227 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -144,13 +144,6 @@ static const char *const arm_mode_strings[] =
static const char *arm_fallback_mode_string = "auto";
static const char *arm_force_mode_string = "auto";
-/* Internal override of the execution mode. -1 means no override,
- 0 means override to ARM mode, 1 means override to Thumb mode.
- The effect is the same as if arm_force_mode has been set by the
- user (except the internal override has precedence over a user's
- arm_force_mode override). */
-static int arm_override_mode = -1;
-
/* Number of different reg name sets (options). */
static int num_disassembly_options;
@@ -423,10 +416,6 @@ arm_pc_is_thumb (struct gdbarch *gdbarch, CORE_ADDR memaddr)
if (IS_THUMB_ADDR (memaddr))
return 1;
- /* Respect internal mode override if active. */
- if (arm_override_mode != -1)
- return arm_override_mode;
-
/* If the user wants to override the symbol table, let him. */
if (strcmp (arm_force_mode_string, "arm") == 0)
return 0;
@@ -4255,9 +4244,6 @@ arm_insert_single_step_breakpoint (struct gdbarch *gdbarch,
struct address_space *aspace,
CORE_ADDR pc)
{
- scoped_restore save_override_mode
- = make_scoped_restore (&arm_override_mode,
- (int) IS_THUMB_ADDR (pc));
pc = gdbarch_addr_bits_remove (gdbarch, pc);
insert_single_step_breakpoint (gdbarch, aspace, pc);