X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fbreak-catch-sig.c;h=f9dc487eefe1687975cce17606adb0cf615963ba;hb=e98ee8c458f3a8405eb93e71b00f801b4bbe3635;hp=9b8cf64950bb9a035284f70faa807a43199c882c;hpb=b270e6f9e09814c82e198859f218b37118eaf098;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c index 9b8cf64950..f9dc487eef 100644 --- a/gdb/break-catch-sig.c +++ b/gdb/break-catch-sig.c @@ -1,6 +1,6 @@ /* Everything about signal catchpoints, for GDB. - Copyright (C) 2011-2017 Free Software Foundation, Inc. + Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of GDB. @@ -145,7 +145,7 @@ signal_catchpoint_remove_location (struct bp_location *bl, static int signal_catchpoint_breakpoint_hit (const struct bp_location *bl, - struct address_space *aspace, + const address_space *aspace, CORE_ADDR bp_addr, const struct target_waitstatus *ws) { @@ -332,7 +332,7 @@ create_signal_catchpoint (int tempflag, std::vector &&filter, list, which is empty if no filtering is required. */ static std::vector -catch_signal_split_args (char *arg, bool *catch_all) +catch_signal_split_args (const char *arg, bool *catch_all) { std::vector result; bool first = true; @@ -343,12 +343,12 @@ catch_signal_split_args (char *arg, bool *catch_all) gdb_signal signal_number; char *endptr; - gdb::unique_xmalloc_ptr one_arg (extract_arg (&arg)); - if (one_arg == NULL) + std::string one_arg = extract_arg (&arg); + if (one_arg.empty ()) break; /* Check for the special flag "all". */ - if (strcmp (one_arg.get (), "all") == 0) + if (one_arg == "all") { arg = skip_spaces (arg); if (*arg != '\0' || !first) @@ -361,14 +361,14 @@ catch_signal_split_args (char *arg, bool *catch_all) first = false; /* Check if the user provided a signal name or a number. */ - num = (int) strtol (one_arg.get (), &endptr, 0); + num = (int) strtol (one_arg.c_str (), &endptr, 0); if (*endptr == '\0') signal_number = gdb_signal_from_command (num); else { - signal_number = gdb_signal_from_name (one_arg.get ()); + signal_number = gdb_signal_from_name (one_arg.c_str ()); if (signal_number == GDB_SIGNAL_UNKNOWN) - error (_("Unknown signal name '%s'."), one_arg.get ()); + error (_("Unknown signal name '%s'."), one_arg.c_str ()); } result.push_back (signal_number); @@ -381,7 +381,7 @@ catch_signal_split_args (char *arg, bool *catch_all) /* Implement the "catch signal" command. */ static void -catch_signal_command (char *arg, int from_tty, +catch_signal_command (const char *arg, int from_tty, struct cmd_list_element *command) { int tempflag; @@ -423,8 +423,6 @@ initialize_signal_catchpoint_ops (void) ops->explains_signal = signal_catchpoint_explains_signal; } -initialize_file_ftype _initialize_break_catch_sig; - void _initialize_break_catch_sig (void) {