aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-01-26Use ordinary calling convention for clean_restartTom Tromey2-16/+6
clean_restart accepts a single optional argument. Rather than using {args} and handling the argument by hand, change it to use Tcl's own argument-checking.
2023-01-26gdb/testsuite/dap: make dap_wait_for_event_and_check return preceding messagesSimon Marchi1-6/+22
In the following patch, I change gdb.dap/basic-dap.exp such that after waiting for some event, it checks if it received another event meanwhile. To help with this, make dap_wait_for_event_and_check and _dap_dap_wait_for_event return a list with everything received before the event of interest. This is similar to what dap_check_request_and_response returns. Change-Id: I85c8980203a2dec833937e7552c2196bc137935d
2023-01-26gdb/testsuite/dap: rename dap_read_event to dap_wait_for_event_and_checkSimon Marchi1-3/+3
I think that name describes a bit better what the proc does, it is similar to "wait_for" in tuiterm.exp. Change-Id: Ie55aa011e6595dd1b5a874db13881ba572ace419
2023-01-26gdb/testsuite/dap: pass around dicts instead of TON objectsSimon Marchi1-25/+23
The DAP helper functions generally return TON objects. However, callers almost all immediately use ton::2dict to convert them to dicts, to access their contents. This commits makes things a bit simpler for them by having function return dicts directly instead. The downside is that the TON objects contain type information. For instance, a "2" in a TCL dict could have been the integer 2 or the string "2" in JSON. By converting to TCL dicts, we lose that information. If some tests specifically want to check the types of some fields, I think we can add intermediary functions that return TON objects, without having to complicate other callers who don't care. Change-Id: I2ca47bea355bf459090bae8680c6a917350b5c3f
2023-01-26gdb/testsuite/dap: remove catch from dap_read_eventSimon Marchi1-5/+1
This catch didn't cause me any trouble, but for the same reason as the preceding patch, I think it's a bit better to just let any exception propagate, to make for easier debugging. Change-Id: I1779e62c788b77fef2d50434edf4c3d2ec5e1c4c
2023-01-26gdb/testsuite/dap: make dap_request_and_response not catch / issue test resultSimon Marchi1-19/+6
Following some of my changes, dap_request_and_response was failing and I didn't know why. I think it's better to make it not catch any exception, and just make it do a simple "send request, read response". If an exception is thrown while sending a request or reading a response, things are going really badly, it's not like we'll want to recover from that and continue the test. Change-Id: I27568d3547f753c3a74e3e5a730d38a8caef9356
2023-01-26gdb/testsuite/dap: write requests to gdb.logSimon Marchi1-1/+1
This helps following what happens when reading gdb.log. The downside is that it becomes harder to tell what text is from GDB and what text is going to GDB, but I think that seeing responses without seeing requests is even more confusing. At least, the lines are prefix with >>>, so when you see this, you know that until the end of the line, it's something that was sent to GDB, and not GDB output. Change-Id: I1ba1acd8b16f4e64686c5ad268cc41082951c874
2023-01-26gdb/testsuite/dap: prefix some procs with _Simon Marchi1-12/+12
Prefix some procs that are only used internally with an underscore, to make it clear they are internal. If they need to be used by some test later, we can always un-prefix them. Change-Id: Iacb8e77363b5d1f8b98d9ba5a6d115aee5c8925d
2023-01-26[gdb/testsuite] Add and use is_x86_64_m64_targetTom de Vries1-0/+5
Add new proc is_x86_64_m64_target and use it where appropriate. Tested on x86_64-linux.
2023-01-25Move target check into allow_altivec_testsTom Tromey1-0/+5
Pedro pointed out that only PPC can possibly have altivec, so we can move the target check into allow_altivec_tests.
2023-01-25Introduce and use is_any_targetTom Tromey1-0/+10
A few tests work on two different targets that can't be detected with a single call to istarget -- that proc only accepts globs, not regular expressions. This patch introduces a new is_any_target proc and then converts these tests to use it in a 'require'.
2023-01-25Rename skip_vsx_tests to allow formTom Tromey1-14/+14
This renames skip_vsx_tests to allow_vsx_tests and updates it users to use require.
2023-01-25Rename skip_power_isa_3_1_tests to allow formTom Tromey1-9/+9
This renames skip_power_isa_3_1_tests to allow_power_isa_3_1_tests and updates its users to use require.
2023-01-25Rename skip_float_test to allow formTom Tromey1-9/+9
This renames skip_float_test to allow_float_test and updates its users to use require.
2023-01-25Convert skip_altivec_tests to allow formTom Tromey1-14/+14
This renames skip_altivec_tests to allow_altivec_tests and updates its users to use require.
2023-01-22Minor fixup in allow_aarch64_sve_testsTom Tromey1-1/+1
An earlier patch failed to update a string in allow_aarch64_sve_tests.
2023-01-18Revert "X86: reverse-finish fix"Carl Love1-33/+0
This reverts commit b22548ddb30bfb167708e82d3bb932461c1b703a. This patch is being reverted since the patch series is causing regressions.
2023-01-17X86: reverse-finish fixCarl Love1-0/+33
PR record/29927 - reverse-finish requires two reverse next instructions to reach previous source line Currently on X86, when executing the finish command in reverse, gdb does a single step from the first instruction in the callee to get back to the caller. GDB stops on the last instruction in the source code line where the call was made. When stopped at the last instruction of the source code line, a reverse next or step command will stop at the first instruction of the same source code line thus requiring two step/next commands to reach the previous source code line. It should only require one step/next command to reach the previous source code line. By contrast, a reverse next or step command from the first line in a function stops at the first instruction in the source code line where the call was made. This patch fixes the reverse finish command so it will stop at the first instruction of the source line where the function call was made. The behavior on X86 for the reverse-finish command now matches doing a reverse-next from the beginning of the function. The proceed_to_finish flag in struct thread_control_state is no longer used. This patch removes the declaration, initialization and setting of the flag. This patch requires a number of regression tests to be updated. Test gdb.mi/mi-reverse.exp no longer needs to execute two steps to get to the previous line. The gdb output for tests gdb.reverse/until-precsave.exp and gdb.reverse/until-reverse.exp changed slightly. The expected result in tests gdb.reverse/amd64-failcall-reverse.exp and gdb.reverse/singlejmp-reverse.exp are updated to the correct expected result. This patch adds a new test gdb.reverse/finish-reverse-next.exp to test the reverse-finish command when returning from the entry point and from the body of the function. The step_until proceedure in test gdb.reverse/step-indirect-call-thunk.exp was moved to lib/gdb.exp and renamed cmd_until. The patch has been tested on X86 and PowerPC to verify no additional regression failures occured. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29927
2023-01-14Pass internal gdb flags to --configuration invocationsTom Tromey2-3/+3
The test suite uses the --configuration flag to feature-test gdb. However, when I added this, I neglected to pass the internal gdbflags to this, causing an error, which then caused failures in the test suite (which would not be seen if you'd ever run "make install"). This patch fixes the bug. Tested by removing my install tree first, to verify that I could reproduce the failure.
2023-01-13Rename to allow_tui_testsTom Tromey3-15/+6
This changes skip_tui_tests to invert the sense, and renames it to allow_tui_tests. It also rewrites this function to use the output of "gdb --configuration", and it adds a note about the state of the TUI to that output.
2023-01-13Rename to allow_guile_testsTom Tromey1-17/+4
This changes skip_guile_tests to invert the sense, and renames it to allow_guile_tests. It also rewrites this proc to check the output of "gdb --configuration", as was done for Python. Then it changes the code to use "require" where possible.
2023-01-13Rename to allow_hw_breakpoint_testsTom Tromey1-5/+5
This changes skip_hw_breakpoint_tests to invert the sense, and renames it to allow_hw_breakpoint_tests. This also converts some tests to use "require" -- I missed this particular check in the first series.
2023-01-13Rename to allow_tsx_testsTom Tromey1-10/+10
This changes skip_tsx_tests to invert the sense, and renames it to allow_tsx_tests.
2023-01-13Rename to allow_shlib_testsTom Tromey1-6/+6
This changes skip_shlib_tests to invert the sense, and renames it to allow_shlib_tests.
2023-01-13Rename to allow_rust_testsTom Tromey1-5/+5
This changes skip_rust_tests to invert the sense, and renames it to allow_rust_tests.
2023-01-13Rename to allow_python_testsTom Tromey1-3/+3
This changes skip_python_tests to invert the sense, and renames it to allow_python_tests.
2023-01-13Rename to allow_perf_testsTom Tromey1-5/+5
This changes skip_perf_tests to invert the sense, and renames it to allow_perf_tests.
2023-01-13Rename to allow_opencl_testsTom Tromey1-8/+8
This changes skip_opencl_tests to invert the sense, and renames it to allow_opencl_tests.
2023-01-13Rename to allow_ifunc_testsTom Tromey1-4/+4
This changes skip_ifunc_tests to invert the sense, and renames it to allow_ifunc_tests.
2023-01-13Rename to allow_hw_watchpoint_testsTom Tromey1-7/+7
This changes skip_hw_watchpoint_tests to invert the sense, and renames it to allow_hw_watchpoint_tests.
2023-01-13Rename to allow_hw_watchpoint_multi_testsTom Tromey1-5/+5
This changes skip_hw_watchpoint_multi_tests to invert the sense, and renames it to allow_hw_watchpoint_multi_tests.
2023-01-13Rename to allow_hw_watchpoint_access_testsTom Tromey1-5/+5
This changes skip_hw_watchpoint_access_tests to invert the sense, and renames it to allow_hw_watchpoint_access_tests.
2023-01-13Rename to allow_go_testsTom Tromey2-4/+4
This changes skip_go_tests to invert the sense, and renames it to allow_go_tests.
2023-01-13Rename to allow_gdbserver_testsTom Tromey1-7/+7
This changes skip_gdbserver_tests to invert the sense, and renames it to allow_gdbserver_tests.
2023-01-13Rename to allow_fortran_testsTom Tromey1-3/+3
This changes skip_fortran_tests to invert the sense, and renames it to allow_fortran_tests.
2023-01-13Rename to allow_d_testsTom Tromey1-3/+3
This changes skip_d_tests to invert the sense, and renames it to allow_d_tests.
2023-01-13Rename to allow_dlmopen_testsTom Tromey1-12/+12
This changes skip_dlmopen_tests to invert the sense, and renames it to allow_dlmopen_tests.
2023-01-13Rename to allow_debuginfod_testsTom Tromey1-7/+7
This changes skip_debuginfod_tests to invert the sense, and renames it to allow_debuginfod_tests.
2023-01-13Rename to allow_ctf_testsTom Tromey1-3/+3
This changes skip_ctf_tests to invert the sense, and renames it to allow_ctf_tests.
2023-01-13Rename to allow_cplus_tests and allow_stl_testsTom Tromey1-10/+9
This changes skip_cplus_tests to invert the sense, and renames it to allow_cplus_tests. This one also converts skip_stl_tests to allow_stl_tests, as that was convenient to do at the same time.
2023-01-13Rename to allow_btrace_testsTom Tromey1-15/+15
This changes skip_btrace_tests to invert the sense, and renames it to allow_btrace_tests.
2023-01-13Rename to allow_btrace_pt_testsTom Tromey1-15/+15
This changes skip_btrace_pt_tests to invert the sense, and renames it to allow_btrace_pt_tests.
2023-01-13Rename to allow_avx512fp16_testsTom Tromey1-12/+12
This changes skip_avx512fp16_tests to invert the sense, and renames it to allow_avx512fp16_tests.
2023-01-13Rename to allow_avx512bf16_testsTom Tromey1-12/+12
This changes skip_avx512bf16_tests to invert the sense, and renames it to allow_avx512bf16_tests.
2023-01-13Rename to allow_ada_testsTom Tromey1-3/+3
This changes skip_ada_tests to invert the sense, and renames it to allow_ada_tests.
2023-01-13Rename to allow_aarch64_sve_testsTom Tromey1-9/+9
This changes skip_aarch64_sve_tests to invert the sense, and renames it to allow_aarch64_sve_tests.
2023-01-13Rename to allow_xml_testTom Tromey2-6/+5
This changes gdb_skip_xml_test to invert the sense, and renames it to allow_xml_test.
2023-01-13Fix latent bug in default_prompt_gdb_startTom Tromey1-0/+11
default_prompt_gdb_start mimics default_gdb_start, but does not set the use_gdb_stub global. This caused one Python test to work only because it used the ordinary gdb_start before later using default_prompt_gdb_start. This patch updates default_prompt_gdb_start to set this global as well.
2023-01-13Remove mi_skip_python_testsTom Tromey1-6/+0
mi_skip_python_tests was necessary because skip_python_tests used the running gdb, and so needed to know what prompt to expect. Now that skip_python_tests has been rewritten, mi_skip_python_tests is no longer needed.
2023-01-13Rewrite skip_python_testsTom Tromey2-25/+4
This rewrites skip_python_tests to examine the output of "gdb --configuration". This is a bit nicer because it does not require an already-running gdb.