diff options
-rw-r--r-- | gdb/testsuite/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/testsuite/boards/gdbserver-base.exp | 50 | ||||
-rw-r--r-- | gdb/testsuite/boards/native-extended-gdbserver.exp | 30 | ||||
-rw-r--r-- | gdb/testsuite/boards/native-gdbserver.exp | 32 | ||||
-rw-r--r-- | gdb/testsuite/boards/native-stdio-gdbserver.exp | 32 |
5 files changed, 66 insertions, 91 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 599dd7f..d53c81c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,16 @@ +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 diff --git a/gdb/testsuite/boards/gdbserver-base.exp b/gdb/testsuite/boards/gdbserver-base.exp new file mode 100644 index 0000000..839af0a --- /dev/null +++ b/gdb/testsuite/boards/gdbserver-base.exp @@ -0,0 +1,50 @@ +# 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 +} diff --git a/gdb/testsuite/boards/native-extended-gdbserver.exp b/gdb/testsuite/boards/native-extended-gdbserver.exp index d4bc06a..6a0e35f 100644 --- a/gdb/testsuite/boards/native-extended-gdbserver.exp +++ b/gdb/testsuite/boards/native-extended-gdbserver.exp @@ -21,6 +21,7 @@ # 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. @@ -28,26 +29,11 @@ global board 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 @@ -132,17 +118,3 @@ proc mi_gdb_load { arg } { 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" diff --git a/gdb/testsuite/boards/native-gdbserver.exp b/gdb/testsuite/boards/native-gdbserver.exp index e32f346..6c1430f 100644 --- a/gdb/testsuite/boards/native-gdbserver.exp +++ b/gdb/testsuite/boards/native-gdbserver.exp @@ -21,10 +21,7 @@ # 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 @@ -32,20 +29,11 @@ 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 @@ -70,21 +58,3 @@ proc ${board}_exec { hostname program args } { 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" diff --git a/gdb/testsuite/boards/native-stdio-gdbserver.exp b/gdb/testsuite/boards/native-stdio-gdbserver.exp index 765ed1b..65183ba 100644 --- a/gdb/testsuite/boards/native-stdio-gdbserver.exp +++ b/gdb/testsuite/boards/native-stdio-gdbserver.exp @@ -21,10 +21,7 @@ # 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 @@ -32,13 +29,6 @@ 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 "" @@ -47,8 +37,6 @@ 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" # The argument to pass to "target remote". # We build this once we know how the testsuite will start gdbserver. @@ -132,21 +120,3 @@ proc ${board}_exec { hostname program args } { 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" |