diff options
author | Tom Tromey <tom@tromey.com> | 2018-04-18 16:53:07 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-04 15:58:08 -0600 |
commit | 60b3cef2e49ba72dea55181a8ad0cb8dbf3f8a5b (patch) | |
tree | 1fecc6fa000b666ff29bd42d66d80ff1901db6e5 /gdb/tracepoint.c | |
parent | Allow defining a user command inside a user command (diff) | |
download | binutils-gdb-60b3cef2e49ba72dea55181a8ad0cb8dbf3f8a5b.tar.gz binutils-gdb-60b3cef2e49ba72dea55181a8ad0cb8dbf3f8a5b.tar.bz2 binutils-gdb-60b3cef2e49ba72dea55181a8ad0cb8dbf3f8a5b.zip |
Use function_view in cli-script.c
This changes some functions in cli-script.c to use function_view
rather than a function pointer and closure argument. This simplifies
the code a bit and is useful in a subsequent patch.
ChangeLog
2018-05-04 Tom Tromey <tom@tromey.com>
* tracepoint.c (actions_command): Update.
* mi/mi-cmd-break.c (mi_command_line_array)
(mi_command_line_array_cnt, mi_command_line_array_ptr)
(mi_read_next_line): Remove.
(mi_cmd_break_commands): Update.
* cli/cli-script.h (read_command_lines, read_command_lines_1): Use
function_view.
* cli/cli-script.c (get_command_line): Update.
(process_next_line): Use function_view. Constify.
(recurse_read_control_structure, read_command_lines)
(read_command_lines_1): Change argument types to function_view.
(do_define_command, document_command): Update.
* breakpoint.h (check_tracepoint_command): Don't declare.
* breakpoint.c (check_tracepoint_command): Remove.
(commands_command_1, create_tracepoint_from_upload): Update.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r-- | gdb/tracepoint.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 189a97d49f0..e170d704bc9 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -579,8 +579,10 @@ actions_command (const char *args, int from_tty) counted_command_line l = read_command_lines (tmpbuf.c_str (), from_tty, 1, - check_tracepoint_command, - t); + [=] (const char *line) + { + validate_actionline (line, t); + }); breakpoint_set_commands (t, std::move (l)); } /* else just return */ |