diff options
author | Tom Tromey <tom@tromey.com> | 2018-04-18 15:59:04 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-04 15:58:07 -0600 |
commit | 295dc222a712b700d9afa7e2462a68b866b120e1 (patch) | |
tree | 3e9e7bc69a97c6b5553175f9ff3ff6f184abdfbd /gdb/tracepoint.c | |
parent | 1263a9d5f1c6198cdb4e73bafe86ca451d35684d (diff) | |
download | gdb-295dc222a712b700d9afa7e2462a68b866b120e1.zip gdb-295dc222a712b700d9afa7e2462a68b866b120e1.tar.gz gdb-295dc222a712b700d9afa7e2462a68b866b120e1.tar.bz2 |
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 <tom@tromey.com>
* 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.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r-- | gdb/tracepoint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 3926304..189a97d 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -577,7 +577,8 @@ actions_command (const char *args, int from_tty) string_printf ("Enter actions for tracepoint %d, one per line.", t->number); - counted_command_line l = read_command_lines (&tmpbuf[0], from_tty, 1, + counted_command_line l = read_command_lines (tmpbuf.c_str (), + from_tty, 1, check_tracepoint_command, t); breakpoint_set_commands (t, std::move (l)); |