aboutsummaryrefslogtreecommitdiff
path: root/gdb/probe.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2022-01-14 09:06:11 -0700
committerTom Tromey <tom@tromey.com>2022-01-18 10:01:20 -0700
commit5947982f1dadfa72a6913f25cc4f56e137c7217e (patch)
tree10300e6cbb942bfa03a00af19c99027edea507e8 /gdb/probe.c
parent85e428a69f5b34770ec4f76168d3c8dbb3a454bf (diff)
downloadfsf-binutils-gdb-5947982f1dadfa72a6913f25cc4f56e137c7217e.zip
fsf-binutils-gdb-5947982f1dadfa72a6913f25cc4f56e137c7217e.tar.gz
fsf-binutils-gdb-5947982f1dadfa72a6913f25cc4f56e137c7217e.tar.bz2
Simplify event_location_probe
event_location_probe currently stores two strings, but really only needs one. This patch simplifies it and removes some unnecessary copies as well.
Diffstat (limited to 'gdb/probe.c')
-rw-r--r--gdb/probe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/probe.c b/gdb/probe.c
index b8da177..689b5f0 100644
--- a/gdb/probe.c
+++ b/gdb/probe.c
@@ -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;