aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-editing.exp
AgeCommit message (Collapse)AuthorFilesLines
2024-01-12Update copyright year range in header of all files managed by GDBAndrew Burgess1-1/+1
This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
2023-01-26Use mi_clean_restart moreTom Tromey1-2/+1
This changes a number of MI tests to use mi_clean_restart rather than separate calls. This reduces the number of lines, which is nice, and also provides a nicer model to copy for future tests.
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-05-16gdb/testsuite: fix "continue outside of loop" TCL errorsBruno Larsen1-1/+1
Many test cases had a few lines in the beginning that look like: if { condition } { continue } Where conditions varied, but were mostly in the form of ![runto_main] or [skip_*_tests], making it quite clear that this code block was supposed to finish the test if it entered the code block. This generates TCL errors, as most of these tests are not inside loops. All cases on which this was an obvious mistake are changed in this patch.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-06-21Make command line editing (use of readline) be per UIPedro Alves1-0/+37
Due to the way that readline's API works (based on globals), we can only have one instance of readline in a process. So the goal of this patch is to only allow editing in the main UI, and make sure that only one UI calls into readline. Some MI paths touch readline variables currently, which is bad as that is changing variables that matter for the main console UI. This patch fixes those. This actually fixes a nasty bug -- starting gdb in MI mode ("gdb -i=mi"), and then doing "set editing on" crashes GDB, because MI is not prepared to use readline: set editing on &"set editing on\n" =cmd-param-changed,param="editing",value="on" ^done (gdb) p 1 readline: readline_callback_read_char() called with no handler! Aborted (core dumped) The fix for that was to add an interp_proc method to query the interpreter whether it actually supports editing. New test included. gdb/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> PR mi/20034 * cli/cli-interp.c: Include cli-interp.h and event-top.h. (cli_interpreter_resume): Pass 1 to gdb_setup_readline. Set the UI's input_handler here. (cli_interpreter_supports_command_editing): New function. (cli_interp_procs): Install it. * cli/cli-interp.h: New file. * event-top.c (async_command_editing_p): Rename to ... (set_editing_cmd_var): ... this. (change_line_handler): Add parameter 'editing', and use it. Bail early if the interpreter doesn't support editing. Don't touch readline state if editing is off. (gdb_rl_callback_handler_remove, gdb_rl_callback_handler_install) (gdb_rl_callback_handler_reinstall): Assert the current UI is the main UI. (display_gdb_prompt): Don't call gdb_rl_callback_handler_remove if not using readline. Check whether the current UI is using command editing instead of checking the async_command_editing_p global. (set_async_editing_command): Delete. (gdb_setup_readline): Add 'editing' parameter. Only allow editing on the main UI. Don't touch readline state if editing is off. (gdb_disable_readline): Don't touch readline state if editing is off. * event-top.h (gdb_setup_readline): Add 'int' parameter. (set_async_editing_command): Delete declaration. (change_line_handler, command_line_handler): Declare. (async_command_editing_p): Rename to ... (set_editing_cmd_var): ... this. * infrun.c (reinstall_readline_callback_handler_cleanup): Check whether the current UI has editing enabled rather than checking the async_command_editing_p global. * interps.c (interp_supports_command_editing): New function. * interps.h (interp_supports_command_editing_ftype): New typedef. (struct interp_procs) <supports_command_editing_proc>: New field. (interp_supports_command_editing): Declare. * mi/mi-interp.c (mi_interpreter_resume): Pass 0 to gdb_setup_readline. Don't clear the async_command_editing_p global. Update comments. * top.c (gdb_readline_wrapper_line, gdb_readline_wrapper): Check whether the current UI has editing enabled rather than checking the async_command_editing_p global. Don't touch readline state if editing is off. (undo_terminal_modifications_before_exit): Switch to the main UI. Unconditionally call gdb_disable_readline. (set_editing): New function. (show_async_command_editing_p): Rename to ... (show_editing): ... this. Show the state of the current UI. (_initialize_top): Adjust. * top.h (struct ui) <command_editing>: New field. * tui/tui-interp.c: Include cli/cli-interp.h. (tui_resume): Pass 1 to gdb_setup_readline. Set the UI's input_handler. (tui_interp_procs): Install cli_interpreter_supports_command_editing. * tui/tui-io.c (tui_getc): Check whether the current UI has editing enabled rather than checking the async_command_editing_p global. gdb/testsuite/ChangeLog: 2016-06-21 Pedro Alves <palves@redhat.com> PR mi/20034 * gdb.mi/mi-editing.exp: New file.