aboutsummaryrefslogtreecommitdiff
path: root/gdb/linespec.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-04-10 15:53:22 -0600
committerTom Tromey <tom@tromey.com>2017-04-12 11:16:19 -0600
commit8e9e35b1808481735e2d1efbf70ed7396a845d8e (patch)
tree3d9c541a3593d66cde6ed2b42345a429c442b8a1 /gdb/linespec.c
parent16e802b9c085ce354b1ab9e2fd25d00bf7626fa8 (diff)
downloadgdb-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/linespec.c')
-rw-r--r--gdb/linespec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 51fa128..acf4900 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1750,8 +1750,9 @@ canonicalize_linespec (struct linespec_state *state, const linespec_p ls)
return;
/* Save everything as an explicit location. */
- canon = state->canonical->location
- = new_explicit_location (&ls->explicit_loc).release ();
+ state->canonical->location
+ = new_explicit_location (&ls->explicit_loc);
+ canon = state->canonical->location.get ();
explicit_loc = get_explicit_location (canon);
if (explicit_loc->label_name != NULL)
@@ -2491,7 +2492,7 @@ event_location_to_sals (linespec_parser *parser,
addr = linespec_expression_to_pc (&const_expr);
if (PARSER_STATE (parser)->canonical != NULL)
PARSER_STATE (parser)->canonical->location
- = copy_event_location (location).release ();
+ = copy_event_location (location);
do_cleanups (cleanup);
}
@@ -2780,7 +2781,7 @@ decode_objc (struct linespec_state *self, linespec_p ls, const char *arg)
str = xstrdup (saved_arg);
make_cleanup (xfree, str);
- self->canonical->location = new_linespec_location (&str).release ();
+ self->canonical->location = new_linespec_location (&str);
}
}
@@ -3892,7 +3893,6 @@ linespec_result::~linespec_result ()
int i;
struct linespec_sals *lsal;
- delete_event_location (location);
for (i = 0; VEC_iterate (linespec_sals, sals, i, lsal); ++i)
{
xfree (lsal->canonical);