]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.dap/remote-dap.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.dap / remote-dap.exp
CommitLineData
1d506c26 1# Copyright 2023-2024 Free Software Foundation, Inc.
67efac36
TT
2
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.
7#
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.
12#
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/>.
15
16# Test "attach" with a remote target in DAP.
17
18load_lib gdbserver-support.exp
19load_lib dap-support.exp
20
21require allow_dap_tests allow_gdbserver_tests
22# We want to have control over where we start gdbserver.
23require {!is_remote target}
24
25# This test is only for remote targets.
26if {[target_info exists gdb_protocol]
27 && [target_info gdb_protocol] != "remote"} {
28 unsupported "requires remote"
29 return
30}
31
32standard_testfile attach.c
33
34if {[build_executable ${testfile}.exp $testfile $srcfile] == -1} {
35 return
36}
37
38set target_exec [gdb_remote_download target [standard_output_file $testfile]]
39
40lassign [gdbserver_start "" $target_exec] protocol port
41# Really should have been caught up above.
42gdb_assert {$protocol == "remote"}
43
44# We just want to test that attaching works at all.
45if {[dap_target_remote $port] != ""} {
46 dap_shutdown true
47}
48
49close_gdbserver