aboutsummaryrefslogtreecommitdiff
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index dac1657..c947c95 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -647,20 +647,17 @@ static void
actions_command (char *args, int from_tty)
{
struct tracepoint *t;
- struct command_line *l;
t = get_tracepoint_by_number (&args, NULL);
if (t)
{
- char *tmpbuf =
- xstrprintf ("Enter actions for tracepoint %d, one per line.",
- t->base.number);
- struct cleanup *cleanups = make_cleanup (xfree, tmpbuf);
-
- l = read_command_lines (tmpbuf, from_tty, 1,
- check_tracepoint_command, t);
- do_cleanups (cleanups);
- breakpoint_set_commands (&t->base, l);
+ std::string tmpbuf =
+ string_printf ("Enter actions for tracepoint %d, one per line.",
+ t->base.number);
+
+ command_line_up l = read_command_lines (&tmpbuf[0], from_tty, 1,
+ check_tracepoint_command, t);
+ breakpoint_set_commands (&t->base, std::move (l));
}
/* else just return */
}