/* Note that 'location' can be NULL in the case of a plain
'break', without arguments. */
location_spec_up locspec
- = (canonical->locspec != NULL
- ? copy_location_spec (canonical->locspec.get ()) : NULL);
+ = (canonical->locspec != nullptr
+ ? canonical->locspec->clone ()
+ : nullptr);
gdb::unique_xmalloc_ptr<char> filter_string
(lsal.canonical != NULL ? xstrdup (lsal.canonical) : NULL);
{
std::unique_ptr <breakpoint> b = new_breakpoint_from_type (gdbarch,
type_wanted);
- b->locspec = copy_location_spec (locspec);
+ b->locspec = locspec->clone ();
if (parse_extra)
b->cond_string = NULL;
for (size_t i = 0; i < lsal.sals.size (); i++)
{
- location_spec_up locspec
- = copy_location_spec (canonical->locspec.get ());
+ location_spec_up locspec = canonical->locspec->clone ();
std::unique_ptr<tracepoint> tp
(new tracepoint (gdbarch,
{
addr = linespec_expression_to_pc (&addr_string);
if (PARSER_STATE (parser)->canonical != NULL)
- PARSER_STATE (parser)->canonical->locspec
- = copy_location_spec (locspec);
+ PARSER_STATE (parser)->canonical->locspec = locspec->clone ();
}
else
addr = addr_spec->address;
/* See description in location.h. */
-location_spec_up
-copy_location_spec (const location_spec *src)
-{
- return src->clone ();
-}
-
-/* See description in location.h. */
-
const char *
location_spec_to_string (struct location_spec *locspec)
{
explicit_location_spec *
as_explicit_location_spec (location_spec *locspec);
-/* Return a copy of the given SRC location spec. */
-
-extern location_spec_up copy_location_spec (const location_spec *src);
-
/* Attempt to convert the input string in *ARGP into a location_spec.
ARGP is advanced past any processed input. Always returns a non-nullptr
location_spec unique pointer object.