aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2022-05-27 16:25:01 +0100
committerPedro Alves <pedro@palves.net>2022-06-17 09:58:49 +0100
commit5c1ddcb69a01c3d4985ecffbbab126a4e8cd4e33 (patch)
treeec84d1ff71f69470b6f439f7e1f1a442599e0080 /gdb/breakpoint.c
parent40d97ee21fc3e39db73ee8f84b847a22f9d251cc (diff)
downloadfsf-binutils-gdb-5c1ddcb69a01c3d4985ecffbbab126a4e8cd4e33.zip
fsf-binutils-gdb-5c1ddcb69a01c3d4985ecffbbab126a4e8cd4e33.tar.gz
fsf-binutils-gdb-5c1ddcb69a01c3d4985ecffbbab126a4e8cd4e33.tar.bz2
Eliminate copy_location_spec
copy_location_spec is just a wrapper around location_spec::clone(), so remove it and call clone() directly. This simplifies users, as they no longer have to use std::unique_ptr::get(). Change-Id: I8ce8658589460b98888283b306b315a5b8f73976
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 82937a3..7e008ba 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -8422,8 +8422,9 @@ create_breakpoints_sal (struct gdbarch *gdbarch,
/* 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);
@@ -8924,7 +8925,7 @@ create_breakpoint (struct gdbarch *gdbarch,
{
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;
@@ -12029,8 +12030,7 @@ strace_marker_create_breakpoints_sal (struct gdbarch *gdbarch,
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,