aboutsummaryrefslogtreecommitdiff
path: root/gdb/ax-gdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r--gdb/ax-gdb.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 7206022..fae2e2d 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -2603,15 +2603,13 @@ agent_command_1 (char *exp, int eval)
struct linespec_result canonical;
int ix;
struct linespec_sals *iter;
- struct cleanup *old_chain;
exp = skip_spaces (exp);
- init_linespec_result (&canonical);
+
event_location_up location = new_linespec_location (&exp);
decode_line_full (location.get (), DECODE_LINE_FUNFIRSTLINE, NULL,
(struct symtab *) NULL, 0, &canonical,
NULL, NULL);
- old_chain = make_cleanup_destroy_linespec_result (&canonical);
exp = skip_spaces (exp);
if (exp[0] == ',')
{
@@ -2625,7 +2623,6 @@ agent_command_1 (char *exp, int eval)
for (i = 0; i < iter->sals.nelts; i++)
agent_eval_command_one (exp, eval, iter->sals.sals[i].pc);
}
- do_cleanups (old_chain);
}
else
agent_eval_command_one (exp, eval, get_frame_pc (get_current_frame ()));