summaryrefslogtreecommitdiff
path: root/gdb/mi/mi-cmd-break.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mi/mi-cmd-break.c')
-rw-r--r--gdb/mi/mi-cmd-break.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 5f9d6aca756..5d15aa98b8a 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -28,7 +28,6 @@
#include "mi-getopt.h"
#include "gdb-events.h"
#include "gdb.h"
-#include "interps.h"
enum
{
@@ -40,8 +39,7 @@ enum
static void
breakpoint_notify (int b)
{
- if (b > 0)
- gdb_breakpoint_query (uiout, b);
+ gdb_breakpoint_query (uiout, b);
}
@@ -79,7 +77,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
int ignore_count = 0;
char *condition = NULL;
enum gdb_rc rc;
- struct gdb_events *old_hooks = NULL;
+ struct gdb_events *old_hooks;
enum opt
{
HARDWARE_OPT, TEMP_OPT /*, REGEXP_OPT */ , CONDITION_OPT,
@@ -135,17 +133,8 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
error ("mi_cmd_break_insert: Garbage following <location>");
address = argv[optind];
- /* Save the current event handlers so that we can insert our own. This
- allows us to capture the breakpoint information as the breakpoint
- is created. Unfortunately, it also overrides any existing event
- handlers, so we won't get any event notifications sent out to the
- client. MI3+ does NOT send breakpoint information with the -break-insert
- command for this reason. */
- if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2)
- || gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1))
- old_hooks = set_gdb_event_hooks (&breakpoint_hooks);
-
/* Now we have what we need, let's insert the breakpoint! */
+ old_hooks = set_gdb_event_hooks (&breakpoint_hooks);
switch (type)
{
case REG_BP:
@@ -171,10 +160,7 @@ mi_cmd_break_insert (char *command, char **argv, int argc)
internal_error (__FILE__, __LINE__,
"mi_cmd_break_insert: Bad switch.");
}
-
- if (gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2)
- || gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1))
- set_gdb_event_hooks (old_hooks);
+ set_gdb_event_hooks (old_hooks);
if (rc == GDB_RC_FAIL)
return MI_CMD_CAUGHT_ERROR;
@@ -250,15 +236,5 @@ mi_cmd_break_watch (char *command, char **argv, int argc)
default:
error ("mi_cmd_break_watch: Unknown watchpoint type.");
}
-
- /* Ugh. This is a hack. mention and print_one_breakpoint in
- breakpoint.c are so overloaded, that watchpoints and breakpoints
- cannot use the same printing mechanisms. So for MI3+, we simply
- rewind MI's uiout so that we can prevent GDB from printing
- any information about the watchpoint we just inserted. */
- if (!gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI2)
- && !gdb_interpreter_current_is_named_p (GDB_INTERPRETER_MI1))
- mi_out_rewind (uiout);
-
return MI_CMD_DONE;
}