Commit | Line | Data |
---|---|---|
8dbe7ca5 YQ |
1 | # Copyright 2015 Free Software Foundation, Inc. |
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 is a dejagnu "board file" and is used to run the testsuite | |
17 | # with remote gdbserver on localhost. | |
18 | # | |
19 | # To use this file: | |
20 | # bash$ cd ${build_dir}/gdb | |
21 | # bash$ make check RUNTESTFLAGS="--target_board=remote-gdbserver-on-localhost" | |
22 | ||
23 | load_generic_config "gdbserver" | |
24 | ||
25 | # The default compiler for this target. | |
26 | set_board_info compiler "[find_gcc]" | |
27 | ||
28 | process_multilib_options "" | |
29 | ||
30 | set_board_info rcp_prog "/usr/bin/scp" | |
31 | set_board_info rsh_prog "/usr/bin/ssh" | |
32 | set_board_info protocol standard | |
33 | set_board_info username $env(USER) | |
34 | set_board_info hostname localhost | |
35 | ||
36 | # We will be using the standard GDB remote protocol | |
37 | set_board_info gdb_protocol "remote" | |
38 | ||
39 | # Test the copy of gdbserver in the build directory, of an absolute path. | |
40 | set_board_info gdb_server_prog "[pwd]/../gdbserver/gdbserver" | |
41 | ||
42 | # Use techniques appropriate to a stub | |
43 | set_board_info use_gdb_stub 1 | |
44 | ||
45 | # This gdbserver can only run a process once per session. | |
46 | set_board_info gdb,do_reload_on_run 1 | |
47 | ||
48 | # gdbserver does not intercept target file operations and perform them | |
49 | # on the host. | |
50 | set_board_info gdb,nofileio 1 | |
51 | ||
52 | # There's no support for argument-passing (yet). | |
53 | set_board_info noargs 1 | |
54 | ||
55 | set_board_info exit_is_reliable 1 | |
56 | ||
57 | # The predefined TSVs in GDBserver. | |
58 | set_board_info gdb,predefined_tsv "\\\$trace_timestamp" | |
59 | ||
60 | set GDBFLAGS "${GDBFLAGS} -ex \"set auto-connect-native-target off\"" | |
61 | ||
62 | proc ${board}_download { board src dest } { | |
63 | if { [file pathtype $src] == "relative" } { | |
64 | return [file join [pwd] $src] | |
65 | } else { | |
66 | return $src | |
67 | } | |
68 | } | |
69 | ||
70 | proc ${board}_upload {dest srcfile args} { | |
71 | return $srcfile | |
72 | } | |
73 | ||
74 | proc ${board}_file { dest op args } { | |
75 | if { $op == "delete" } { | |
76 | return 0 | |
77 | } | |
78 | return [eval [list standard_file $dest $op] $args] | |
79 | } |