Commit | Line | Data |
---|---|---|
b811d2c2 | 1 | # Copyright 2011-2020 Free Software Foundation, Inc. |
739b3f1d PA |
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 | # This file has common bits shared between other dejagnu "board files" | |
17 | # that are used to run the testsuite with gdbserver connected via | |
18 | # stdio. Boards that source this must reimplement the | |
19 | # get_target_remote_pipe_address procedure. | |
20 | ||
21 | load_board_description "gdbserver-base" | |
22 | ||
23 | # Note this is loaded for gdb_target_cmd, not for making this board | |
24 | # use the generic "gdbserver" config. | |
25 | load_lib gdbserver-support.exp | |
26 | ||
27 | # This gdbserver can only run a process once per session. | |
28 | set_board_info gdb,do_reload_on_run 1 | |
29 | ||
30 | # There's no support for argument-passing (yet). | |
31 | set_board_info noargs 1 | |
32 | ||
33 | set_board_info use_gdb_stub 1 | |
34 | set_board_info exit_is_reliable 1 | |
35 | ||
36 | # We will be using the standard GDB remote protocol. | |
37 | set_board_info gdb_protocol "remote" | |
38 | ||
39 | # Return the CMD string in "target remote | CMD". | |
40 | proc get_target_remote_pipe_cmd {} { | |
41 | error "must reimplement this procedure" | |
42 | } | |
43 | ||
44 | proc make_gdbserver_stdio_port {} { | |
45 | return "| [get_target_remote_pipe_cmd]" | |
46 | } | |
47 | ||
75d04512 | 48 | proc gdb_reload { {inferior_args {}} } { |
739b3f1d PA |
49 | return [gdb_target_cmd "remote" [make_gdbserver_stdio_port]] |
50 | } | |
51 | ||
52 | proc mi_gdb_target_load { } { | |
53 | return [mi_gdb_target_cmd "remote" [make_gdbserver_stdio_port]] | |
54 | } |