1 1.1.1.1.2.2 pgoyette # Copyright 2015 Free Software Foundation, Inc. 2 1.1.1.1.2.2 pgoyette 3 1.1.1.1.2.2 pgoyette # This program is free software; you can redistribute it and/or modify 4 1.1.1.1.2.2 pgoyette # it under the terms of the GNU General Public License as published by 5 1.1.1.1.2.2 pgoyette # the Free Software Foundation; either version 3 of the License, or 6 1.1.1.1.2.2 pgoyette # (at your option) any later version. 7 1.1.1.1.2.2 pgoyette # 8 1.1.1.1.2.2 pgoyette # This program is distributed in the hope that it will be useful, 9 1.1.1.1.2.2 pgoyette # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 1.1.1.1.2.2 pgoyette # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 1.1.1.1.2.2 pgoyette # GNU General Public License for more details. 12 1.1.1.1.2.2 pgoyette # 13 1.1.1.1.2.2 pgoyette # You should have received a copy of the GNU General Public License 14 1.1.1.1.2.2 pgoyette # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 1.1.1.1.2.2 pgoyette 16 1.1.1.1.2.2 pgoyette # This file is a dejagnu "board file" and is used to run the testsuite 17 1.1.1.1.2.2 pgoyette # with remote gdbserver on localhost. 18 1.1.1.1.2.2 pgoyette # 19 1.1.1.1.2.2 pgoyette # To use this file: 20 1.1.1.1.2.2 pgoyette # bash$ cd ${build_dir}/gdb 21 1.1.1.1.2.2 pgoyette # bash$ make check RUNTESTFLAGS="--target_board=remote-gdbserver-on-localhost" 22 1.1.1.1.2.2 pgoyette 23 1.1.1.1.2.2 pgoyette load_generic_config "gdbserver" 24 1.1.1.1.2.2 pgoyette 25 1.1.1.1.2.2 pgoyette # The default compiler for this target. 26 1.1.1.1.2.2 pgoyette set_board_info compiler "[find_gcc]" 27 1.1.1.1.2.2 pgoyette 28 1.1.1.1.2.2 pgoyette process_multilib_options "" 29 1.1.1.1.2.2 pgoyette 30 1.1.1.1.2.2 pgoyette # The sshd should be running on localhost and ssh key should be 31 1.1.1.1.2.2 pgoyette # correctly set up that you ssh to localhost without having to type 32 1.1.1.1.2.2 pgoyette # password. 33 1.1.1.1.2.2 pgoyette set_board_info rcp_prog "/usr/bin/scp" 34 1.1.1.1.2.2 pgoyette set_board_info rsh_prog "/usr/bin/ssh" 35 1.1.1.1.2.2 pgoyette set_board_info protocol standard 36 1.1.1.1.2.2 pgoyette set_board_info username $env(USER) 37 1.1.1.1.2.2 pgoyette set_board_info hostname localhost 38 1.1.1.1.2.2 pgoyette 39 1.1.1.1.2.2 pgoyette # We will be using the standard GDB remote protocol 40 1.1.1.1.2.2 pgoyette set_board_info gdb_protocol "remote" 41 1.1.1.1.2.2 pgoyette 42 1.1.1.1.2.2 pgoyette # Test the copy of gdbserver in the build directory, of an absolute path. 43 1.1.1.1.2.2 pgoyette set_board_info gdb_server_prog "[pwd]/../gdbserver/gdbserver" 44 1.1.1.1.2.2 pgoyette 45 1.1.1.1.2.2 pgoyette # Use techniques appropriate to a stub 46 1.1.1.1.2.2 pgoyette set_board_info use_gdb_stub 1 47 1.1.1.1.2.2 pgoyette 48 1.1.1.1.2.2 pgoyette # This gdbserver can only run a process once per session. 49 1.1.1.1.2.2 pgoyette set_board_info gdb,do_reload_on_run 1 50 1.1.1.1.2.2 pgoyette 51 1.1.1.1.2.2 pgoyette # gdbserver does not intercept target file operations and perform them 52 1.1.1.1.2.2 pgoyette # on the host. 53 1.1.1.1.2.2 pgoyette set_board_info gdb,nofileio 1 54 1.1.1.1.2.2 pgoyette 55 1.1.1.1.2.2 pgoyette # There's no support for argument-passing (yet). 56 1.1.1.1.2.2 pgoyette set_board_info noargs 1 57 1.1.1.1.2.2 pgoyette 58 1.1.1.1.2.2 pgoyette set_board_info exit_is_reliable 1 59 1.1.1.1.2.2 pgoyette 60 1.1.1.1.2.2 pgoyette # The predefined TSVs in GDBserver. 61 1.1.1.1.2.2 pgoyette set_board_info gdb,predefined_tsv "\\\$trace_timestamp" 62 1.1.1.1.2.2 pgoyette 63 1.1.1.1.2.2 pgoyette set GDBFLAGS "${GDBFLAGS} -ex \"set auto-connect-native-target off\"" 64 1.1.1.1.2.2 pgoyette 65 1.1.1.1.2.2 pgoyette proc ${board}_download { board src dest } { 66 1.1.1.1.2.2 pgoyette if { [file pathtype $src] == "relative" } { 67 1.1.1.1.2.2 pgoyette return [file join [pwd] $src] 68 1.1.1.1.2.2 pgoyette } else { 69 1.1.1.1.2.2 pgoyette return $src 70 1.1.1.1.2.2 pgoyette } 71 1.1.1.1.2.2 pgoyette } 72 1.1.1.1.2.2 pgoyette 73 1.1.1.1.2.2 pgoyette proc ${board}_upload {dest srcfile args} { 74 1.1.1.1.2.2 pgoyette return $srcfile 75 1.1.1.1.2.2 pgoyette } 76 1.1.1.1.2.2 pgoyette 77 1.1.1.1.2.2 pgoyette proc ${board}_file { dest op args } { 78 1.1.1.1.2.2 pgoyette if { $op == "delete" } { 79 1.1.1.1.2.2 pgoyette return 0 80 1.1.1.1.2.2 pgoyette } 81 1.1.1.1.2.2 pgoyette return [eval [list standard_file $dest $op] $args] 82 1.1.1.1.2.2 pgoyette } 83