+2013-07-07 Yao Qi <yao@codesourcery.com>
+
+ * boards/native-gdbserver.exp: Move invoke of
+ process_multilib_options to gdbserver-base.exp.
+ Move set_board_info 'compiler', 'gdb,noinferiorio',
+ 'gdb,nofileio', 'gdb_server_prog' and 'gdb,predefined_tsv' to
+ gdbserver-base.exp.
+ Move proc ${board}_download, ${board}_upload and
+ ${board}_file to gdbserver-base.exp.
+ * boards/native-extended-gdbserver.exp: Likewise.
+ * boards/native-stdio-gdbserver.exp: Likewise.
+ * boards/gdbserver-base.exp: New file.
+
2013-07-05 Luis Machado <lgustavo@codesourcery.com>
* gdb.base/dump.exp: Remove arch-specific tests and do a
--- /dev/null
+# Copyright 2011-2013 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This file has common bits shared between other dejagnu "board files"
+# that are used to run the testsuite with gdbserver.
+
+process_multilib_options ""
+
+# The default compiler for this target.
+set_board_info compiler "[find_gcc]"
+
+# Test the copy of gdbserver in the build directory.
+set_board_info gdb_server_prog "../gdbserver/gdbserver"
+
+# Can't do input (or output) in the current gdbserver.
+set_board_info gdb,noinferiorio 1
+
+# gdbserver does not intercept target file operations and perform them
+# on the host.
+set_board_info gdb,nofileio 1
+
+# The predefined TSVs in GDBserver.
+set_board_info gdb,predefined_tsv "\\\$trace_timestamp"
+
+proc ${board}_file { dest op args } {
+ if { $op == "delete" } {
+ return 0
+ }
+ return [eval [list standard_file $dest $op] $args]
+}
+
+proc ${board}_download { board host dest } {
+ return $host
+}
+
+proc ${board}_upload {dest srcfile args} {
+ return $srcfile
+}
# bash$ make check RUNTESTFLAGS="--target_board=native-extended-gdbserver"
load_generic_config "extended-gdbserver"
+load_board_description "gdbserver-base"
# By default, dejagnu makes the board remote unless the board name
# matches localhost. Force it to be NOT remote.
global board_info
set board_info($board,isremote) 0
-process_multilib_options ""
-
-# The default compiler for this target.
-set_board_info compiler "[find_gcc]"
-
-# Can't do input (or output) in the current gdbserver.
-set_board_info gdb,noinferiorio 1
-
-# gdbserver does not intercept target file operations and perform them
-# on the host.
-set_board_info gdb,nofileio 1
-
set_board_info sockethost "localhost:"
# We will be using the extended GDB remote protocol.
set_board_info gdb_protocol "extended-remote"
-# Test the copy of gdbserver in the build directory.
-set_board_info gdb_server_prog "../gdbserver/gdbserver"
-
send_user "configuring for gdbserver local testing (extended-remote)\n"
# We must load this explicitly here, and rename the procedures we want
return 0
}
-
-proc ${board}_download { board host dest } {
- return $host
-}
-
-proc ${board}_file { dest op args } {
- if { $op == "delete" } {
- return 0
- }
- return [eval [list standard_file $dest $op] $args]
-}
-
-# The predefined TSVs in GDBserver.
-set_board_info gdb,predefined_tsv "\\\$trace_timestamp"
# bash$ make check RUNTESTFLAGS="--target_board=native-gdbserver"
load_generic_config "gdbserver"
-process_multilib_options ""
-
-# The default compiler for this target.
-set_board_info compiler "[find_gcc]"
+load_board_description "gdbserver-base"
# This gdbserver can only run a process once per session.
set_board_info gdb,do_reload_on_run 1
# There's no support for argument-passing (yet).
set_board_info noargs 1
-# Can't do input (or output) in the current gdbserver.
-set_board_info gdb,noinferiorio 1
-
-# gdbserver does not intercept target file operations and perform them
-# on the host.
-set_board_info gdb,nofileio 1
-
set_board_info sockethost "localhost:"
set_board_info use_gdb_stub 1
# We will be using the standard GDB remote protocol.
set_board_info gdb_protocol "remote"
-# Test the copy of gdbserver in the build directory.
-set_board_info gdb_server_prog "../gdbserver/gdbserver"
proc ${board}_spawn { board cmd } {
global board_info
return $result
}
-
-proc ${board}_download { board host dest } {
- return $host
-}
-
-proc ${board}_upload {dest srcfile args} {
- return $srcfile
-}
-
-proc ${board}_file { dest op args } {
- if { $op == "delete" } {
- return 0
- }
- return [eval [list standard_file $dest $op] $args]
-}
-
-# The predefined TSVs in GDBserver.
-set_board_info gdb,predefined_tsv "\\\$trace_timestamp"
# bash$ make check RUNTESTFLAGS="--target_board=native-stdio-gdbserver"
load_generic_config "gdbserver"
-process_multilib_options ""
-
-# The default compiler for this target.
-set_board_info compiler "[find_gcc]"
+load_board_description "gdbserver-base"
# This gdbserver can only run a process once per session.
set_board_info gdb,do_reload_on_run 1
# There's no support for argument-passing (yet).
set_board_info noargs 1
-# Can't do input (or output) in the current gdbserver.
-set_board_info gdb,noinferiorio 1
-
-# gdbserver does not intercept target file operations and perform them
-# on the host.
-set_board_info gdb,nofileio 1
-
# Hack into sockethost to pass our peculiar remote connection string.
set_board_info sockethost "stdio"
set_board_info gdb,socketport ""
# We will be using the standard GDB remote protocol.
set_board_info gdb_protocol "remote"
-# Test the copy of gdbserver in the build directory.
-set_board_info gdb_server_prog "../gdbserver/gdbserver"
# The argument to pass to "target remote".
# We build this once we know how the testsuite will start gdbserver.
return $result
}
-
-proc ${board}_download { board host dest } {
- return $host
-}
-
-proc ${board}_upload {dest srcfile args} {
- return $srcfile
-}
-
-proc ${board}_file { dest op args } {
- if { $op == "delete" } {
- return 0
- }
- return [eval [list standard_file $dest $op] $args]
-}
-
-# The predefined TSVs in GDBserver.
-set_board_info gdb,predefined_tsv "\\\$trace_timestamp"