aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-watch-nonstop.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-13Rename to allow_hw_watchpoint_testsTom Tromey1-1/+1
This changes skip_hw_watchpoint_tests to invert the sense, and renames it to allow_hw_watchpoint_tests.
2023-01-13Use require support_displaced_steppingTom Tromey1-6/+1
This changes some tests to use "require support_displaced_stepping".
2023-01-13Use require !skip_hw_watchpoint_testsTom Tromey1-3/+1
This changes some tests to use "require !skip_hw_watchpoint_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-10-18Update tests to use skip_hw_watchpoint_tests to test for HW watchpoint support.Carl Love1-1/+1
The hardware watchpoint check has been updated in a couple of recent patches. This patch updates the hardware watchpoint test in the remaining gdb tests. The issue is the PowerPC processors support hardware watchpoints with the exception of Power 9. The hardware watchpoint support is disabled on Power 9. The test skip_hw_watchpoint_tests must be used to correctly determine if the PowerPC processor supports hardware watchpoints. This patch fixes 6 test failures in test gdb.threads/watchpoint-fork.exp. Test gdb.base/watch-vfork.exp runs with can-use-hw-watchpoints set to true and false. When the test is run with can-use-hw-watchpoints set to true, gdb just falls back to using software watchpoints. The patch reduces the number of expected passes by 2 since because it now only runs once with can-use-hw-watchpoints set to false. Test gdb.mi/mi-watch.exp runs the test with argument hw and sw. If the argument is hw and hardware watchpoints are not supported the test exits. The number of expected passes is cut in half with the patch as it now only runs the test using software breakpoints. Previously the pass to use hardware watchpoints was not skipped and the test actually ran using software watchpoints. The following tests run the same with and without the patch. The tests are supposed to execute the gdb command "set can-use-hw-watchpoints 0" if the processor does not support hardware bwatchpoints. However the command was not being executed and gdb was falling back to using software watchpoints since the Power 9 watchpoint resource check fails. With the patch, the tests now execute the command and the test runs using software watchpoints as it did previously. The tests are: gdb.base/commands.exp gdb.base/cond-eval-mode.exp gdb.base/display.exp gdb.base/gdb11531.exp gdb.base/recurse.exp gdb.base/value-double-free.exp gdb.base/watch-bitfields.exp gdb.base/watch-cond-infcall.exp gdb.base/watch-cond.exp gdb.base/watchpoint-solib.exp gdb.base/watchpoints.exp The following two tests are not supported on the Power 9 system used to test the changes. The patch does not change the tests results for these tests: gdb.python/py-breakpoint.exp gdb.mi/mi-watch-nonstop.exp
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-11-18gdb/testsuite: gdb.mi/mi-nonstop-exit.exp: enable non-stop using GDBFLAGSSimon Marchi1-2/+4
When running make check TESTS="gdb.mi/mi-nonstop-exit.exp" RUNTESTFLAGS="--target_board=native-extended-gdbserver" We get: 220^error,msg="Unexpected vCont reply in non-stop mode: T05swbreak:;06:60d5ffffff7f0000;07:d0d2ffffff7f0000;10:5b57fdf7ff7f0000;thread:p2a4eed.2a4eed;core :4;"^M (gdb) ^M UNRESOLVED: gdb.mi/mi-nonstop-exit.exp: first run: unable to start target This is because non-stop is enabled using "-gdb-set non-stop 1". This doesn't work with the native-extended-gdbserver board, because with that board GDB connects to GDBserver as soon as it's started. Non-stop needs to be enabled before connecting. The usual pattern to follow is to set non-stop on the command line, like gdb.mi/mi-nonstop.exp does. Change the non-stop MI tests to use that pattern. The results diff when running gdb.mi/*.exp is: -# of expected passes 2877 +# of expected passes 2938 # of unexpected failures 34 # of expected failures 8 # of known failures 13 # of unresolved testcases 4 # of unsupported tests 1 -# of duplicate test names 34 +# of duplicate test names 35 gdb/testsuite/ChangeLog: * gdb.mi/mi-nonstop-exit.exp: Enable non-stop through GDBFLAGS. * gdb.mi/mi-ns-stale-regcache.exp: Likewise. * gdb.mi/mi-nsintrall.exp: Likewise. * gdb.mi/mi-nsmoribund.exp: Likewise. * gdb.mi/mi-nsthrexec.exp: Likewise. * gdb.mi/mi-watch-nonstop.exp: Likewise. Change-Id: Ic2736bedea8d448eee8c2b534d26b2427f6b4d27
2020-10-13Eliminate mi_run_to_main, introduce mi_clean_restartPedro Alves1-8/+2
Since we now have mi_runto_main which is like runto_main, eliminate mi_run_to_main, in favor of a new MI clean_restart counterpart -- mi_clean_restart -- and mi_runto_main. This makes MI testcases look a bit more like CLI testcases. gdb/testsuite/ChangeLog: * lib/mi-support.exp (mi_clean_restart): New. (mi_run_to_main): Delete. All callers adjust to use mi_clean_restart / mi_runto_main. Change-Id: I34920bab4fea1f23fb752928c2969c1f6ad714b6
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-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-05-29enable target async by default; separate MI and target notions of asyncPedro Alves1-1/+1
This finally makes background execution commands possible by default. However, in order to do that, there's one last thing we need to do -- we need to separate the MI and target notions of "async". Unlike the CLI, where the user explicitly requests foreground vs background execution in the execution command itself (c vs c&), MI chose to treat "set target-async" specially -- setting it changes the default behavior of execution commands. So, we can't simply "set target-async" default to on, as that would affect MI frontends. Instead we have to make the setting MI-specific, and teach MI about sync commands on top of an async target. Because the "target" word in "set target-async" ends up as a potential source of confusion, the patch adds a "set mi-async" option, and makes "set target-async" a deprecated alias. Rather than make the targets always async, this patch introduces a new "maint set target-async" option so that the GDB developer can control whether the target is async. This makes it simpler to debug issues arising only in the synchronous mode; important because sync mode seems unlikely to go away. Unlike in previous revisions, "set target-async" does not affect this new maint parameter. The rationale for this is that then one can easily run the test suite in the "maint set target-async off" mode and have tests that enable mi-async fail just like they fail on non-async-capable targets. This emulation is exactly the point of the maint option. I had asked Tom in a previous iteration to split the actual change of the target async default to a separate patch, but it turns out that that is quite awkward in this version of the patch, because with MI async and target async decoupled (unlike in previous versions), if we don't flip the default at the same time, then just "set target-async on" alone never actually manages to do anything. It's best to not have that transitory state in the tree. Given "set target-async on" now only has effect for MI, the patch goes through the testsuite removing it from non-MI tests. MI tests are adjusted to use the new and less confusing "mi-async" spelling. 2014-05-29 Pedro Alves <palves@redhat.com> Tom Tromey <tromey@redhat.com> * NEWS: Mention "maint set target-async", "set mi-async", and that background execution commands are now always available. * target.h (target_async_permitted): Update comment. * target.c (target_async_permitted, target_async_permitted_1): Default to 1. (set_target_async_command): Rename to ... (maint_set_target_async_command): ... this. (show_target_async_command): Rename to ... (maint_show_target_async_command): ... this. (_initialize_target): Adjust. * infcmd.c (prepare_execution_command): Make extern. * inferior.h (prepare_execution_command): Declare. * infrun.c (set_observer_mode): Leave target async alone. * mi/mi-interp.c (mi_interpreter_init): Install mi_on_sync_execution_done as sync_execution_done observer. (mi_on_sync_execution_done): New function. (mi_execute_command_input_handler): Don't print the prompt if we just started a synchronous command with an async target. (mi_on_resume): Check sync_execution before printing prompt. * mi/mi-main.h (mi_async_p): Declare. * mi/mi-main.c: Include gdbcmd.h. (mi_async_p): New function. (mi_async, mi_async_1): New globals. (set_mi_async_command, show_mi_async_command, mi_async): New functions. (exec_continue): Call prepare_execution_command. (run_one_inferior, mi_cmd_exec_run, mi_cmd_list_target_features) (mi_execute_async_cli_command): Use mi_async_p. (_initialize_mi_main): Install "set mi-async". Make "target-async" a deprecated alias. 2014-05-29 Pedro Alves <palves@redhat.com> Tom Tromey <tromey@redhat.com> * gdb.texinfo (Non-Stop Mode): Remove "set target-async 1" from example. (Asynchronous and non-stop modes): Document '-gdb-set mi-async'. Mention that target-async is now deprecated. (Maintenance Commands): Document maint set/show target-async. 2014-05-29 Pedro Alves <palves@redhat.com> Tom Tromey <tromey@redhat.com> * gdb.base/async-shell.exp: Don't enable target-async. * gdb.base/async.exp * gdb.base/corefile.exp (corefile_test_attach): Remove 'async' parameter. Adjust. (top level): Don't test with "target-async". * gdb.base/dprintf-non-stop.exp: Don't enable target-async. * gdb.base/gdb-sigterm.exp: Don't test with "target-async". * gdb.base/inferior-died.exp: Don't enable target-async. * gdb.base/interrupt-noterm.exp: Likewise. * gdb.mi/mi-async.exp: Use "mi-async" instead of "target-async". * gdb.mi/mi-nonstop-exit.exp: Likewise. * gdb.mi/mi-nonstop.exp: Likewise. * gdb.mi/mi-ns-stale-regcache.exp: Likewise. * gdb.mi/mi-nsintrall.exp: Likewise. * gdb.mi/mi-nsmoribund.exp: Likewise. * gdb.mi/mi-nsthrexec.exp: Likewise. * gdb.mi/mi-watch-nonstop.exp: Likewise. * gdb.multi/watchpoint-multi.exp: Adjust comment. * gdb.python/py-evsignal.exp: Don't enable target-async. * gdb.python/py-evthreads.exp: Likewise. * gdb.python/py-prompt.exp: Likewise. * gdb.reverse/break-precsave.exp: Don't test with "target-async". * gdb.server/solib-list.exp: Don't enable target-async. * gdb.threads/thread-specific-bp.exp: Likewise. * lib/mi-support.exp: Adjust to use mi-async.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-1/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-07-10 * gdb.mi/dw2-ref-missing-frame.exp: Use standard_testfile,Tom Tromey1-3/+1
standard_output_file. * gdb.mi/gdb2549.exp: Use standard_testfile. * gdb.mi/gdb669.exp: Use standard_testfile. * gdb.mi/gdb701.exp: Use standard_testfile. * gdb.mi/gdb792.exp: Use standard_testfile. * gdb.mi/mi-async.exp: Use standard_testfile. * gdb.mi/mi-basics.exp: Use standard_testfile. * gdb.mi/mi-break.exp: Use standard_testfile. * gdb.mi/mi-cli.exp: Use standard_testfile. * gdb.mi/mi-console.exp: Use standard_testfile. * gdb.mi/mi-disassemble.exp: Use standard_testfile. * gdb.mi/mi-eval.exp: Use standard_testfile. * gdb.mi/mi-file-transfer.exp: Use standard_testfile. * gdb.mi/mi-file.exp: Use standard_testfile. * gdb.mi/mi-inheritance-syntax-error.exp: Use standard_testfile. * gdb.mi/mi-logging.exp: Use standard_testfile. * gdb.mi/mi-nonstop-exit.exp: Use standard_testfile. * gdb.mi/mi-nonstop.exp: Use standard_testfile. * gdb.mi/mi-ns-stale-regcache.exp: Use standard_testfile. * gdb.mi/mi-nsintrall.exp: Use standard_testfile. * gdb.mi/mi-nsmoribund.exp: Use standard_testfile. * gdb.mi/mi-nsthrexec.exp: Use standard_testfile. * gdb.mi/mi-pending.exp: Use standard_testfile, standard_output_file. * gdb.mi/mi-pthreads.exp: Use standard_testfile. * gdb.mi/mi-read-memory.exp: Use standard_testfile. * gdb.mi/mi-regs.exp: Use standard_testfile. * gdb.mi/mi-return.exp: Use standard_testfile. * gdb.mi/mi-reverse.exp: Use standard_testfile. * gdb.mi/mi-simplerun.exp: Use standard_testfile. * gdb.mi/mi-solib.exp: Use standard_testfile, standard_output_file. * gdb.mi/mi-stack.exp: Use standard_testfile. * gdb.mi/mi-stepi.exp: Use standard_testfile. * gdb.mi/mi-stepn.exp: Use standard_testfile. * gdb.mi/mi-syn-frame.exp: Use standard_testfile. * gdb.mi/mi-until.exp: Use standard_testfile. * gdb.mi/mi-var-block.exp: Use standard_testfile. * gdb.mi/mi-var-child-f.exp: Use standard_testfile. * gdb.mi/mi-var-child.exp: Use standard_testfile. * gdb.mi/mi-var-cmd.exp: Use standard_testfile. * gdb.mi/mi-var-cp.exp: Use standard_testfile. * gdb.mi/mi-var-display.exp: Use standard_testfile. * gdb.mi/mi-var-invalidate.exp: Use standard_testfile, standard_output_file. * gdb.mi/mi-var-rtti.exp: Use standard_testfile. * gdb.mi/mi-watch-nonstop.exp: Use standard_testfile. * gdb.mi/mi-watch.exp: Use standard_testfile. * gdb.mi/mi2-amd64-entry-value.exp: Use standard_testfile. * gdb.mi/mi2-basics.exp: Use standard_testfile. * gdb.mi/mi2-break.exp: Use standard_testfile. * gdb.mi/mi2-cli.exp: Use standard_testfile. * gdb.mi/mi2-console.exp: Use standard_testfile. * gdb.mi/mi2-disassemble.exp: Use standard_testfile. * gdb.mi/mi2-eval.exp: Use standard_testfile. * gdb.mi/mi2-file.exp: Use standard_testfile. * gdb.mi/mi2-pthreads.exp: Use standard_testfile. * gdb.mi/mi2-read-memory.exp: Use standard_testfile. * gdb.mi/mi2-regs.exp: Use standard_testfile. * gdb.mi/mi2-return.exp: Use standard_testfile. * gdb.mi/mi2-simplerun.exp: Use standard_testfile. * gdb.mi/mi2-stack.exp: Use standard_testfile. * gdb.mi/mi2-stepi.exp: Use standard_testfile. * gdb.mi/mi2-syn-frame.exp: Use standard_testfile. * gdb.mi/mi2-until.exp: Use standard_testfile. * gdb.mi/mi2-var-block.exp: Use standard_testfile. * gdb.mi/mi2-var-child.exp: Use standard_testfile. * gdb.mi/mi2-var-cmd.exp: Use standard_testfile. * gdb.mi/mi2-var-display.exp: Use standard_testfile. * gdb.mi/mi2-watch.exp: Use standard_testfile.
2012-01-04Copyright year update in most files of the GDB Project.Joel Brobecker1-1/+1
gdb/ChangeLog: Copyright year update in most files of the GDB Project.
2011-12-14gdb/Pedro Alves1-0/+77
2011-12-14 Pedro Alves <pedro@codesourcery.com> PR threads/10729 * linux-nat.c (linux_nat_new_thread): Change parameter to an lwp pointer. (linux_nat_prepare_to_resume): New global. (lwp_free): New. (purge_lwp_list): Use it. (add_lwp): Call linux_nat_new_thread even on the first LWP. Adjust to interface change. (delete_lwp): Call lwp_free instead of xfree. (detach_callback, linux_nat_detach, resume_lwp, linux_nat_resume) (linux_handle_syscall_trap, linux_handle_extended_wait) (linux_nat_filter_event, resume_stopped_resumed_lwps): Call linux_nat_prepare_to_resume before resuming. (linux_stop_lwp): New. (linux_nat_set_new_thread): Adjust. (linux_nat_set_prepare_to_resume): New. * linux-nat.h (struct arch_lwp_info): Forward declare. (struct lwp_info) <arch_private>: New field. (linux_stop_lwp): Declare. (linux_nat_set_new_thread): Adjust. (linux_nat_set_prepare_to_resume): New. * i386-nat.c (DR_NADDR, DR_STATUS, DR_CONTROL) (struct i386_debug_reg_state): Move to i386-nat.h. (dr_mirror): Comment. (i386_debug_reg_state): New. (i386_update_inferior_debug_regs): Simplify. (i386_stopped_data_address): Use the debug register state from the inferior, not from the local cache. * i386-nat.h (struct i386_dr_low_type): Delete reset_addr and unset_status fields. New get_addr and get_control fields. (DR_FIRSTADDR, DR_LASTADDR, DR_CONTROL): Moved from i386-nat.c. (DR_NADDR, DR_STATUS): New. (struct i386_debug_reg_state): Moved from i386-nat.c. * amd64-linux-nat.c (struct arch_lwp_info): New. (amd64_linux_dr): Delete global. (amd64_linux_dr_get_addr): New. (amd64_linux_dr_get_control): New. (amd64_linux_dr_unset_status): Delete. (amd64_linux_dr_set_addr): Reimplement. (amd64_linux_dr_reset_addr): Delete. (update_debug_registers_callback): New. (amd64_linux_dr_set_control): Reimplement. (amd64_linux_dr_set_addr): Reimplement. (amd64_linux_prepare_to_resume): New. (amd64_linux_new_thread): Change parameter to an lwp pointer. Reimplement. (_initialize_amd64_linux_nat): No longer install i386_dr_low.reset_addr and i386_dr_low.unset_status. Install amd64_linux_dr_get_control as i386_dr_low.get_control. Install amd64_linux_dr_get_addr as i386_dr_low.get_addr. Install amd64_linux_prepare_to_resume. * i386-linux-nat.c (DR_FIRSTADDR, DR_LASTADDR, DR_STATUS) (DR_CONTROL): Delete. (struct arch_lwp_info): New. (i386_linux_dr): Delete global. (i386_linux_dr_set_control): Reimplement. (i386_linux_dr_get_addr): New. (i386_linux_dr_set_addr): Reimplement. (i386_linux_dr_get_control): New. (update_debug_registers_callback): New. (i386_linux_dr_unset_status): Delete. (i386_linux_dr_set_addr): Reimplement. (i386_linux_prepare_to_resume): New. (i386_linux_new_thread): Change parameter to an lwp pointer. Reimplement. (_initialize_i386_linux_nat): No longer install i386_dr_low.reset_addr and i386_dr_low.unset_status. Install i386_linux_dr_get_control as i386_dr_low.get_control. Install i386_linux_dr_get_addr as i386_dr_low.get_addr. Install i386_linux_prepare_to_resume. * arm-linux-nat.c (arm_linux_new_thread): Change parameter to an lwp pointer. Adjust. * ia64-linux-nat.c (ia64_linux_new_thread): Likewise. * mips-linux-nat.c (mips_linux_new_thread): Likewise. * ppc-linux-nat.c (ppc_linux_new_thread): Likewise. * s390-nat.c (s390_fix_watch_points): Likewise. * i386-darwin-nat.c (DR_FIRSTADDR, DR_LASTADDR, DR_STATUS) (DR_CONTROL): Delete. (i386_darwin_dr_reset_addr): Delete. (i386_darwin_dr_get_addr): New. (i386_darwin_dr_get_control): New. * go32-nat.c (go32_get_dr7, go32_get_dr): New. (init_go32_ops): No longer install i386_dr_low.reset_addr. Install go32_get_dr7 as i386_dr_low.get_control. Install go32_get_dr as i386_dr_low.get_addr. * i386bsd-nat.c (i386bsd_dr_get): New. (i386bsd_dr_reset_addr): Delete. (i386bsd_dr_get_addr): New. (i386bsd_dr_get_status): Use i386bsd_dr_get. (i386bsd_dr_get_control): New. * i386bsd-nat.h (i386bsd_dr_reset_addr): Delete. (i386bsd_dr_get_addr): New. (i386bsd_dr_get_control): New. * i386fbsd-nat.c (_initialize_i386fbsd_nat): No longer install i386_dr_low.reset_addr and i386_dr_low.unset_status. Install i386bsd_dr_get_control as i386_dr_low.get_control. Install i386bsd_dr_get_addr as i386_dr_low.get_addr. * windows-nat.c (init_windows_ops): No longer install i386_dr_low.reset_addr and i386_dr_low.unset_status. Install cygwin_get_dr7 as i386_dr_low.get_control. Install cygwin_get_dr as i386_dr_low.get_addr. (cygwin_get_dr): New. (cygwin_get_dr7): New. gdb/testsuite/ 2011-12-14 Pedro Alves <pedro@codesourcery.com> PR threads/10729 * gdb.mi/watch-nonstop.c: New file. * gdb.mi/mi-watch-nonstop.exp: New file.