/* 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.
#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"
/* See definition in probe.h. */
std::vector<symtab_and_line>
-parse_probes (const struct event_location *location,
+parse_probes (const location_spec *locspec,
struct program_space *search_pspace,
struct linespec_result *canonical)
{
char *objfile_namestr = NULL, *provider = NULL, *name, *p;
const char *arg_start, *cs;
- gdb_assert (event_location_type (location) == PROBE_LOCATION);
- arg_start = get_probe_location (location);
+ gdb_assert (locspec->type () == PROBE_LOCATION_SPEC);
+ arg_start = locspec->to_string ();
cs = arg_start;
const static_probe_ops *spops = probe_linespec_to_static_ops (&cs);
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->locspec = new_probe_location_spec (std::move (canon));
}
return result;
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));
{
compute_probe_arg,
compile_probe_arg,
- NULL
};