]>
Commit | Line | Data |
---|---|---|
618f726f | 1 | # Copyright 2015-2016 Free Software Foundation, Inc. |
8dbe7ca5 YQ |
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 | ||
07fcd301 YQ |
30 | # The sshd should be running on localhost and ssh key should be |
31 | # correctly set up that you ssh to localhost without having to type | |
32 | # password. | |
8dbe7ca5 YQ |
33 | set_board_info rcp_prog "/usr/bin/scp" |
34 | set_board_info rsh_prog "/usr/bin/ssh" | |
35 | set_board_info protocol standard | |
36 | set_board_info username $env(USER) | |
37 | set_board_info hostname localhost | |
38 | ||
39 | # We will be using the standard GDB remote protocol | |
40 | set_board_info gdb_protocol "remote" | |
41 | ||
42 | # Test the copy of gdbserver in the build directory, of an absolute path. | |
43 | set_board_info gdb_server_prog "[pwd]/../gdbserver/gdbserver" | |
44 | ||
45 | # Use techniques appropriate to a stub | |
46 | set_board_info use_gdb_stub 1 | |
47 | ||
48 | # This gdbserver can only run a process once per session. | |
49 | set_board_info gdb,do_reload_on_run 1 | |
50 | ||
51 | # gdbserver does not intercept target file operations and perform them | |
52 | # on the host. | |
53 | set_board_info gdb,nofileio 1 | |
54 | ||
55 | # There's no support for argument-passing (yet). | |
56 | set_board_info noargs 1 | |
57 | ||
58 | set_board_info exit_is_reliable 1 | |
59 | ||
60 | # The predefined TSVs in GDBserver. | |
61 | set_board_info gdb,predefined_tsv "\\\$trace_timestamp" | |
62 | ||
63 | set GDBFLAGS "${GDBFLAGS} -ex \"set auto-connect-native-target off\"" | |
64 | ||
65 | proc ${board}_download { board src dest } { | |
66 | if { [file pathtype $src] == "relative" } { | |
67 | return [file join [pwd] $src] | |
68 | } else { | |
69 | return $src | |
70 | } | |
71 | } | |
72 | ||
73 | proc ${board}_upload {dest srcfile args} { | |
74 | return $srcfile | |
75 | } | |
76 | ||
77 | proc ${board}_file { dest op args } { | |
78 | if { $op == "delete" } { | |
79 | return 0 | |
80 | } | |
81 | return [eval [list standard_file $dest $op] $args] | |
82 | } |