diff options
author | Tom Tromey <tom@tromey.com> | 2017-04-10 15:53:22 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-04-12 11:16:19 -0600 |
commit | 8e9e35b1808481735e2d1efbf70ed7396a845d8e (patch) | |
tree | 3d9c541a3593d66cde6ed2b42345a429c442b8a1 /gdb/breakpoint.c | |
parent | 16e802b9c085ce354b1ab9e2fd25d00bf7626fa8 (diff) | |
download | gdb-8e9e35b1808481735e2d1efbf70ed7396a845d8e.zip gdb-8e9e35b1808481735e2d1efbf70ed7396a845d8e.tar.gz gdb-8e9e35b1808481735e2d1efbf70ed7396a845d8e.tar.bz2 |
Change linespec_result::location to be an event_location_up
This is a follow-up to another patch. It changes
linespec_result::location to be an event_location_up.
gdb/ChangeLog
2017-04-12 Tom Tromey <tom@tromey.com>
* probe.c (parse_probes): Update.
* location.h (delete_event_location): Don't declare.
(event_location_deleter::operator()): Update.
* location.c (event_location_deleter::operator()): Rename from
delete_event_location.
* linespec.h (linespec_result) <location>: Change type to
event_location_up.
* linespec.c (canonicalize_linespec, event_location_to_sals)
(decode_objc): Update.
(linespec_result): Don't call delete_event_location.
* breakpoint.c (create_breakpoints_sal)
(bkpt_probe_create_sals_from_location)
(strace_marker_create_sals_from_location): Update.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 42f344a..42e2e6d 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -9429,7 +9429,7 @@ create_breakpoints_sal (struct gdbarch *gdbarch, 'break', without arguments. */ event_location_up location = (canonical->location != NULL - ? copy_event_location (canonical->location) : NULL); + ? copy_event_location (canonical->location.get ()) : NULL); char *filter_string = lsal->canonical ? xstrdup (lsal->canonical) : NULL; make_cleanup (xfree, filter_string); @@ -13390,7 +13390,8 @@ bkpt_probe_create_sals_from_location (const struct event_location *location, struct linespec_sals lsal; lsal.sals = parse_probes (location, NULL, canonical); - lsal.canonical = xstrdup (event_location_to_string (canonical->location)); + lsal.canonical + = xstrdup (event_location_to_string (canonical->location.get ())); VEC_safe_push (linespec_sals, canonical->sals, &lsal); } @@ -13646,10 +13647,11 @@ strace_marker_create_sals_from_location (const struct event_location *location, str = savestring (arg_start, arg - arg_start); cleanup = make_cleanup (xfree, str); - canonical->location = new_linespec_location (&str).release (); + canonical->location = new_linespec_location (&str); do_cleanups (cleanup); - lsal.canonical = xstrdup (event_location_to_string (canonical->location)); + lsal.canonical + = xstrdup (event_location_to_string (canonical->location.get ())); VEC_safe_push (linespec_sals, canonical->sals, &lsal); } @@ -13686,7 +13688,7 @@ strace_marker_create_breakpoints_sal (struct gdbarch *gdbarch, expanded.nelts = 1; expanded.sals = &lsal->sals.sals[i]; - location = copy_event_location (canonical->location); + location = copy_event_location (canonical->location.get ()); tp = new tracepoint (); init_breakpoint_sal (&tp->base, gdbarch, expanded, |