/* MI Command Set - breakpoint and watchpoint commands.
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2017 Free Software Foundation, Inc.
Contributed by Cygnus Solutions (a Red Hat company).
This file is part of GDB.
If not, it will insert other type breakpoint. */
static void
-mi_cmd_break_insert_1 (int dprintf, char *command, char **argv, int argc)
+mi_cmd_break_insert_1 (int dprintf, const char *command, char **argv, int argc)
{
char *address = NULL;
int hardware = 0;
int tracepoint = 0;
struct cleanup *back_to = make_cleanup (null_cleanup, NULL);
enum bptype type_wanted;
- struct event_location *location;
+ event_location_up location;
struct breakpoint_ops *ops;
int is_explicit = 0;
struct explicit_location explicit_loc;
}
else
{
- location = string_to_event_location (&address, current_language);
+ location = string_to_event_location_basic (&address, current_language);
if (*address)
- {
- delete_event_location (location);
- error (_("Garbage '%s' at end of location"), address);
- }
+ error (_("Garbage '%s' at end of location"), address);
}
- make_cleanup_delete_event_location (location);
-
- create_breakpoint (get_current_arch (), location, condition, thread,
+ create_breakpoint (get_current_arch (), location.get (), condition, thread,
extra_string,
0 /* condition and thread are valid. */,
temp_p, type_wanted,
See the MI manual for the list of possible options. */
void
-mi_cmd_break_insert (char *command, char **argv, int argc)
+mi_cmd_break_insert (const char *command, char **argv, int argc)
{
mi_cmd_break_insert_1 (0, command, argv, argc);
}
See the MI manual for the list of possible options. */
void
-mi_cmd_dprintf_insert (char *command, char **argv, int argc)
+mi_cmd_dprintf_insert (const char *command, char **argv, int argc)
{
mi_cmd_break_insert_1 (1, command, argv, argc);
}
};
void
-mi_cmd_break_passcount (char *command, char **argv, int argc)
+mi_cmd_break_passcount (const char *command, char **argv, int argc)
{
int n;
int p;
-break-watch -a <expr> --> insert an access wp. */
void
-mi_cmd_break_watch (char *command, char **argv, int argc)
+mi_cmd_break_watch (const char *command, char **argv, int argc)
{
char *expr = NULL;
enum wp_type type = REG_WP;
}
void
-mi_cmd_break_commands (char *command, char **argv, int argc)
+mi_cmd_break_commands (const char *command, char **argv, int argc)
{
- struct command_line *break_command;
+ command_line_up break_command;
char *endptr;
int bnum;
struct breakpoint *b;
else
break_command = read_command_lines_1 (mi_read_next_line, 1, 0, 0);
- breakpoint_set_commands (b, break_command);
+ breakpoint_set_commands (b, std::move (break_command));
}