| Index: gdb/testsuite/gdb.gdb/selftest.exp
|
| diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
|
| index 7645caf9892acb1bf0b1ceea17f22e4b119de932..3f934cf92aeb69ba6d6bd8edb06b3eb9ab0e4e45 100644
|
| --- a/gdb/testsuite/gdb.gdb/selftest.exp
|
| +++ b/gdb/testsuite/gdb.gdb/selftest.exp
|
| @@ -1,5 +1,4 @@
|
| -# Copyright 1988, 1990-1992, 1994, 1997, 1999-2000, 2002-2012 Free
|
| -# Software Foundation, Inc.
|
| +# Copyright 1988-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
|
| @@ -16,6 +15,7 @@
|
|
|
| # This file was written by Rob Savoye. (rob@cygnus.com)
|
|
|
| +load_lib selftest-support.exp
|
|
|
| # are we on a target board
|
| if { [is_remote target] || ![isnative] } then {
|
| @@ -151,6 +151,14 @@ proc do_steps_and_nexts {} {
|
| set description "next over textdomain PACKAGE"
|
| set command "next"
|
| }
|
| + -re ".*bfd_init ..;.*$gdb_prompt $" {
|
| + set description "next over bfd_init"
|
| + set command "next"
|
| + }
|
| + -re ".*notice_open_fds ..;.*$gdb_prompt $" {
|
| + set description "next over notice_open_fds"
|
| + set command "next"
|
| + }
|
| -re ".*VEC_cleanup .cmdarg_s.*$gdb_prompt $" {
|
| set description "next over cmdarg_s VEC_cleanup"
|
| set command "next"
|
| @@ -242,6 +250,7 @@ proc test_with_self { executable } {
|
| global det_file
|
| global decimal
|
| global timeout
|
| + global INTERNAL_GDBFLAGS
|
|
|
| # load yourself into the debugger
|
| # This can take a relatively long time, particularly for testing where
|
| @@ -303,7 +312,7 @@ proc test_with_self { executable } {
|
| set timeout 600
|
|
|
| set description "run until breakpoint at captured_main"
|
| - gdb_test_multiple "run -nw" "$description" {
|
| + gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" {
|
| -re "Starting program.*Breakpoint \[0-9\]+,.*captured_main .data.* at .*main.c:.*$gdb_prompt $" {
|
| pass "$description"
|
| }
|
| @@ -464,43 +473,26 @@ proc test_with_self { executable } {
|
| return 0
|
| }
|
|
|
| -# Find a pathname to a file that we would execute if the shell was asked
|
| -# to run $arg using the current PATH.
|
| -
|
| -proc find_gdb { arg } {
|
| -
|
| - # If the arg directly specifies an existing executable file, then
|
| - # simply use it.
|
| -
|
| - if [file executable $arg] then {
|
| - return $arg
|
| - }
|
| -
|
| - set result [which $arg]
|
| - if [string match "/" [ string range $result 0 0 ]] then {
|
| - return $result
|
| - }
|
| -
|
| - # If everything fails, just return the unqualified pathname as default
|
| - # and hope for best.
|
| -
|
| - return $arg
|
| -}
|
| -
|
| # Run the test with self.
|
| # Copy the file executable file in case this OS doesn't like to edit its own
|
| # text space.
|
|
|
| set GDB_FULLPATH [find_gdb $GDB]
|
|
|
| +if {[is_remote host]} {
|
| + set xgdb x$tool
|
| +} else {
|
| + set xgdb [standard_output_file x$tool]
|
| +}
|
| +
|
| # Remove any old copy lying around.
|
| -remote_file host delete x$tool
|
| +remote_file host delete $xgdb
|
|
|
| gdb_start
|
| -set file [remote_download host $GDB_FULLPATH x$tool]
|
| -set result [test_with_self $file];
|
| -gdb_exit;
|
| -catch "remote_file host delete $file";
|
| +set file [remote_download host $GDB_FULLPATH $xgdb]
|
| +set result [test_with_self $file]
|
| +gdb_exit
|
| +catch "remote_file host delete $file"
|
|
|
| if {$result <0} then {
|
| warning "Couldn't test self"
|
|
|