gdb: remove BLOCK_NAMESPACE macro
[binutils-gdb.git] / gdb / probe.c
index 9eccf82f25d994eb27f2be33954b17cb4bbdabd5..f0a40f5face1317b41ad06c0ed8b9336e32c08fa 100644 (file)
@@ -1,6 +1,6 @@
 /* Generic static probe support for GDB.
 
-   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+   Copyright (C) 2012-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,7 +27,7 @@
 #include "progspace.h"
 #include "filenames.h"
 #include "linespec.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "frame.h"
 #include "arch-utils.h"
 #include "value.h"
@@ -204,7 +204,7 @@ parse_probes (const struct event_location *location,
       std::string canon (arg_start, arg_end - arg_start);
       canonical->special_display = 1;
       canonical->pre_expanded = 1;
-      canonical->location = new_probe_location (canon.c_str ());
+      canonical->location = new_probe_location (std::move (canon));
     }
 
   return result;
@@ -571,9 +571,8 @@ info_probes_for_spops (const char *arg, int from_tty,
        ui_out_emit_tuple tuple_emitter (current_uiout, "probe");
 
        current_uiout->field_string ("type", probe_type);
-       current_uiout->field_string ("provider",
-                                    probe.prob->get_provider ().c_str ());
-       current_uiout->field_string ("name", probe.prob->get_name ().c_str ());
+       current_uiout->field_string ("provider", probe.prob->get_provider ());
+       current_uiout->field_string ("name", probe.prob->get_name ());
        current_uiout->field_core_addr ("addr", probe.prob->get_gdbarch (),
                                        probe.prob->get_relocated_address
                                        (probe.objfile));
@@ -867,7 +866,6 @@ static const struct internalvar_funcs probe_funcs =
 {
   compute_probe_arg,
   compile_probe_arg,
-  NULL
 };