From 295dc222a712b700d9afa7e2462a68b866b120e1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 18 Apr 2018 15:59:04 -0600 Subject: Constify prompt argument to read_command_lines The prompt argument to read_command_lines can be const. This patch makes this change, and also removes some fixed-sized buffers in favor of using string_printf. ChangeLog 2018-05-04 Tom Tromey * tracepoint.c (actions_command): Update. * cli/cli-script.h (read_command_lines): Update. * cli/cli-script.c (read_command_lines): Constify prompt_arg. (MAX_TMPBUF): Remove define. (define_command): Use string_printf. (document_command): Likewise. * breakpoint.c (commands_command_1): Update. --- gdb/breakpoint.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/breakpoint.c') diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 7d1daa2..72a3e16 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1256,8 +1256,7 @@ commands_command_1 (const char *arg, int from_tty, "%s, one per line."), arg); - cmd = read_command_lines (&str[0], - from_tty, 1, + cmd = read_command_lines (str.c_str (), from_tty, 1, (is_tracepoint (b) ? check_tracepoint_command : 0), b); -- cgit v1.1