Add translations for various sub-directories
[binutils-gdb.git] / gdb / testsuite / gdb.dap / remote-dap.exp
blobbca66dd10550a7349e7b5cf0143959e01555e04f
1 # Copyright 2023-2024 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 # Test "attach" with a remote target in DAP.
18 load_lib gdbserver-support.exp
19 load_lib dap-support.exp
21 require allow_dap_tests allow_gdbserver_tests
22 # We want to have control over where we start gdbserver.
23 require {!is_remote target}
25 # This test is only for remote targets.
26 if {[target_info exists gdb_protocol]
27     && [target_info gdb_protocol] != "remote"} {
28     unsupported "requires remote"
29     return
32 standard_testfile attach.c
34 if {[build_executable ${testfile}.exp $testfile $srcfile] == -1} {
35     return
38 set target_exec [gdb_remote_download target [standard_output_file $testfile]]
40 lassign [gdbserver_start "" $target_exec] protocol port
41 # Really should have been caught up above.
42 gdb_assert {$protocol == "remote"}
44 # We just want to test that attaching works at all.
45 set attach_id [dap_target_remote $port]
47 dap_check_request_and_response "configurationDone" configurationDone
49 dap_check_response "attach response" attach $attach_id
51 dap_shutdown true
53 close_gdbserver