From patchwork Fri Sep 12 22:42:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 2826 Received: (qmail 12250 invoked by alias); 12 Sep 2014 22:43:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 12239 invoked by uid 89); 12 Sep 2014 22:42:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 12 Sep 2014 22:42:57 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8CMgtHQ019249 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 12 Sep 2014 18:42:56 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8CMgso9025122 for ; Fri, 12 Sep 2014 18:42:54 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH] Remove support for testing against dead "target vxworks" Date: Fri, 12 Sep 2014 23:42:53 +0100 Message-Id: <1410561773-17974-1-git-send-email-palves@redhat.com> "target vxworks" and friends have been removed 10 years ago already: commit e84ecc995d6a5e4e9114d3cea61717b8a573afb6 Author: Andrew Cagney AuthorDate: Sat Nov 13 23:10:02 2004 +0000 2004-11-13 Andrew Cagney * configure.tgt: Delete i[34567]86-*-vxworks*, m68*-netx-*, m68*-*-vxworks*, mips*-*-vxworks*, powerpc-*-vxworks*, and sparc-*-vxworks*. * NEWS: Mention that vxworks was deleted. (...) * remote-vxmips.c, remote-vx.c: Delete. * remote-vx68.c: Delete. (...) This removes related leftover cruft from the testsuite. Tested on x86_64 Fedora 20, native and gdbserver. gdb/testsuite/ 2014-09-12 Pedro Alves * config/vx.exp, config/vxworks.exp, config/vxworks29k.exp: Delete files. * gdb.base/a2-run.exp: Remove all code guarded by istarget "*-*-vxworks*" throughout. * gdb.base/break.exp: Likewise. * gdb.base/default.exp: Likewise. * gdb.base/scope.exp: Likewise. * gdb.base/sepdebug.exp: Likewise. * gdb.base/break.c: Remove all code guarded by #ifdef vxworks throughout. * gdb.base/run.c: Likewise. * gdb.base/sepdebug.c: Likewise. * gdb.hp/gdb.aCC/run.c: Likewise. * gdb.reverse/until-reverse.c: Likewise. * lib/gdb.exp (gdb_compile): Remove is_vxworks branch. --- gdb/testsuite/config/vx.exp | 126 -------------------------- gdb/testsuite/config/vxworks.exp | 16 ---- gdb/testsuite/config/vxworks29k.exp | 23 ----- gdb/testsuite/gdb.base/a2-run.exp | 144 ++++++------------------------ gdb/testsuite/gdb.base/break.c | 35 +------- gdb/testsuite/gdb.base/break.exp | 7 -- gdb/testsuite/gdb.base/default.exp | 15 ---- gdb/testsuite/gdb.base/run.c | 35 +------- gdb/testsuite/gdb.base/scope.exp | 10 --- gdb/testsuite/gdb.base/sepdebug.c | 35 +------- gdb/testsuite/gdb.base/sepdebug.exp | 8 -- gdb/testsuite/gdb.hp/gdb.aCC/run.c | 35 +------- gdb/testsuite/gdb.reverse/until-reverse.c | 35 +------- gdb/testsuite/lib/gdb.exp | 4 - 14 files changed, 36 insertions(+), 492 deletions(-) delete mode 100644 gdb/testsuite/config/vx.exp delete mode 100644 gdb/testsuite/config/vxworks.exp delete mode 100644 gdb/testsuite/config/vxworks29k.exp diff --git a/gdb/testsuite/config/vx.exp b/gdb/testsuite/config/vx.exp deleted file mode 100644 index 7603490..0000000 --- a/gdb/testsuite/config/vx.exp +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright 1988-2014 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 . - -# This file was written by Rob Savoye. (rob@cygnus.com) - -# -# load support libraries -# -load_lib remote.exp -load_lib gdb.exp - -set shell_prompt "->" -set gdb_prompt "\\(vxgdb\\)" - -# -# gdb_version -- extract and print the version number of gcc -# -proc gdb_version {} { - default_gdb_version -} - -# -# gdb_load -- load a file into the debugger. -# We have to stop and start gdb each time we do this, because when -# vxgdb loads two files in a row, the symbols in the first file loaded -# take precedence. Returns -1 on error, else 0. -# -proc gdb_load { arg } { - set result 0 - - if { [remote_ld target $arg] != 0 } { - perror "Couldn't load $arg" - return -1 - } - - return [gdb_file_cmd $arg] -} - -# -# gdb_start -- start gdb running -# -proc gdb_start { } { - global gdb_prompt - global verbose - global connectmode - global reboot - - # get a connection to the board - for { set x 0 } { $x < 3 } { incr x } { - set shell_id [remote_open target] - if { $shell_id > 0 } { - verbose "Spawn id for remote shell is $shell_id" - - set timeout 10 - verbose "Timeout is now $timeout seconds" 2 - - set state [spawn_vxgdb] - if { $state == "pass" } { - return 0 - } - if { $state == "fail" } { - return -1 - } - } - remote_reboot target - } -} - -proc spawn_vxgdb { } { - global gdb_prompt - - default_gdb_start - - # set the default arguments to "main", so that "run" with no - # arguments will work correctly. - send_gdb "set args main\n" - gdb_expect -re ".*$gdb_prompt $" {} - - verbose "Setting up target, Please wait..." - # set targets hostname - send_gdb "target vxworks [target_info hostname]\n" - set timeout 60 - verbose "Timeout is now $timeout seconds" 2 - gdb_expect { - -re "Done\..*$gdb_prompt $" { - verbose "Set target to [target_info hostname]" 1 - set timeout 10 - return "pass" - } - -re "net_connect: RPC: (Program not registered|.*Timed out).*$" { - warning "Couldn't set GDB to target [target_info netport]." - } - timeout { - warning "Couldn't set target for vxworks." - } - } - return "retry" -} - -proc gdb_exit { } { - remote_close target - catch default_gdb_exit -} - -#expect_after { -# "" { send "\n"; perror "Window too small." } -# -re "\(y or n\) " { send "n\n"; perror "Got interactive prompt." } -# buffer_full { perror "internal buffer is full." } -# eof { perror "eof -- pty is hosed." } -# timeout { perror "timeout." } -# "virtual memory exhausted" { perror "virtual memory exhausted." } -# "Undefined command" { perror "send string probably wrong." } -#} - diff --git a/gdb/testsuite/config/vxworks.exp b/gdb/testsuite/config/vxworks.exp deleted file mode 100644 index 09209ec..0000000 --- a/gdb/testsuite/config/vxworks.exp +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 1997-2014 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 . - -load_lib ../config/vx.exp diff --git a/gdb/testsuite/config/vxworks29k.exp b/gdb/testsuite/config/vxworks29k.exp deleted file mode 100644 index 604ff0d..0000000 --- a/gdb/testsuite/config/vxworks29k.exp +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1995-2014 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 . - -# This file was written by Brendan Kehoe (brendan@cygnus.com). - -# We need this file here because the targetname for the 29k board -# is `vxworks29k', not `vxworks'. That way other tools (e.g., gcc) -# can differentiate between the stuff run on that board and others. - -verbose "Loading ${srcdir}/config/vx.exp" -source ${srcdir}/config/vx.exp diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp index 10aaf67..fc87602 100644 --- a/gdb/testsuite/gdb.base/a2-run.exp +++ b/gdb/testsuite/gdb.base/a2-run.exp @@ -31,31 +31,26 @@ if { [prepare_for_testing ${testfile}.exp $testfile $srcfile] } { } # Run with no arguments. -# On VxWorks this justs make sure the program was run. gdb_run_cmd set test "run \"$testfile\" with no args" -if [istarget "*-*-vxworks*"] then { - gdb_test "" "usage: factorial .*" $test -} else { - gdb_test_multiple "" $test { - -re ".*usage: factorial .*$inferior_exited_re with code 01.\r\n$gdb_prompt $" { - pass $test - pass "no spurious messages at program exit" - } - -re ".*usage: factorial .*$inferior_exited_re with code 01.*$gdb_prompt $" { - pass $test - fail "no spurious messages at program exit" - } - -re ".*usage: factorial .* EXIT code 1.*$inferior_exited_re normally.\r\n$gdb_prompt $" { - pass "$test (exit wrapper)" - pass "no spurious messages at program exit" - } - -re ".*usage: factorial .* EXIT code 1.*$inferior_exited_re normally.*$gdb_prompt $" { - pass "$test (exit wrapper)" - fail "no spurious messages at program exit" - } +gdb_test_multiple "" $test { + -re ".*usage: factorial .*$inferior_exited_re with code 01.\r\n$gdb_prompt $" { + pass $test + pass "no spurious messages at program exit" + } + -re ".*usage: factorial .*$inferior_exited_re with code 01.*$gdb_prompt $" { + pass $test + fail "no spurious messages at program exit" + } + -re ".*usage: factorial .* EXIT code 1.*$inferior_exited_re normally.\r\n$gdb_prompt $" { + pass "$test (exit wrapper)" + pass "no spurious messages at program exit" + } + -re ".*usage: factorial .* EXIT code 1.*$inferior_exited_re normally.*$gdb_prompt $" { + pass "$test (exit wrapper)" + fail "no spurious messages at program exit" } } @@ -67,112 +62,30 @@ if [target_info exists noargs] then { } # Now run with some arguments -if [istarget "*-*-vxworks*"] then { - send_gdb "run vxmain \"5\"\n" - gdb_expect -re "run vxmain \"5\"\r\n" {} - set timeout 120 - verbose "Timeout is now $timeout seconds" 2 - gdb_expect { - "$inferior_exited_re normally" { - unresolved "run \"$testfile\" with arg" - } - "120" { - pass "run \"$testfile\" with arg" - } - timeout { - fail "(timeout) run \"$testfile\" with arg" - } - } - set timeout 10 - verbose "Timeout is now $timeout seconds" 2 - gdb_expect -re "$gdb_prompt $" {} -} else { - setup_xfail "arm-*-coff" - gdb_run_cmd 5 - gdb_test "" "120.*" "run \"$testfile\" with arg" -} +setup_xfail "arm-*-coff" +gdb_run_cmd 5 +gdb_test "" "120.*" "run \"$testfile\" with arg" # Run again with same arguments. gdb_run_cmd -if [istarget "*-*-vxworks*"] then { - set timeout 120 - verbose "Timeout is now $timeout seconds" 2 - gdb_expect { - "$inferior_exited_re normally" { - unresolved "run \"$testfile\" again with same args" - } - "120" { pass "run \"$testfile\" again with same args" } - timeout { fail "(timeout) run \"$testfile\" again with same args" } - } - set timeout 10 - verbose "Timeout is now $timeout seconds" 2 - gdb_expect -re "$gdb_prompt $" {} -} else { - setup_xfail "arm-*-coff" - gdb_test "" "120.*" "run \"$testfile\" again with same args" -} +setup_xfail "arm-*-coff" +gdb_test "" "120.*" "run \"$testfile\" again with same args" # Use "set args" command to specify no arguments as default and run again. -if [istarget "*-*-vxworks*"] then { - gdb_test_no_output "set args main" -} else { - gdb_test_no_output "set args" -} +gdb_test_no_output "set args" gdb_run_cmd -if [istarget "*-*-vxworks*"] then { - set timeout 120 - verbose "Timeout is now $timeout seconds" 2 - gdb_expect { - "$inferior_exited_re normally" { - unresolved "run after setting args to nil" - } - "usage: factorial " { - pass "run after setting args to nil" - } - timeout { - fail "(timeout) run after setting args to nil" - } - } - set timeout 10 - verbose "Timeout is now $timeout seconds" 2 - gdb_expect -re "$gdb_prompt $" {} -} else { - gdb_test "" "usage: factorial .*" "run after setting args to nil" -} +gdb_test "" "usage: factorial .*" "run after setting args to nil" # Use "set args" command to specify an argument and run again. -if [istarget "*-*-vxworks*"] then { - gdb_test_no_output "set args vxmain \"6\"" -} else { - gdb_test_no_output "set args 6" -} +gdb_test_no_output "set args 6" gdb_run_cmd -if [istarget "*-*-vxworks*"] then { - set timeout 120 - verbose "Timeout is now $timeout seconds" 2 - gdb_expect { - "$inferior_exited_re normally" { - unresolved "run \"$testfile\" again after setting args" - } - "720" { - pass "run \"$testfile\" again after setting args" - } - timeout { - fail "(timeout) run \"$testfile\" again after setting args" - } - } - set timeout 10 - verbose "Timeout is now $timeout seconds" 2 - gdb_expect -re "$gdb_prompt $" {} -} else { - setup_xfail "arm-*-coff" - gdb_test "" "720.*" "run \"$testfile\" again after setting args" -} +setup_xfail "arm-*-coff" +gdb_test "" "720.*" "run \"$testfile\" again after setting args" # GOAL: Test that shell is being used with "run". For remote debugging # targets, there is no guarantee that a "shell" (whatever that is) is used. @@ -181,8 +94,3 @@ if ![is_remote target] then { "Starting program.*40320.*" \ "run \"$testfile\" with shell" } - -# Reset the default arguments for VxWorks -if [istarget "*-*-vxworks*"] then { - gdb_test_no_output "set args main" -} diff --git a/gdb/testsuite/gdb.base/break.c b/gdb/testsuite/gdb.base/break.c index 834720a..0fd8f44 100644 --- a/gdb/testsuite/gdb.base/break.c +++ b/gdb/testsuite/gdb.base/break.c @@ -15,39 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifdef vxworks - -# include - -/* VxWorks does not supply atoi. */ -static int -atoi (z) - char *z; -{ - int i = 0; - - while (*z >= '0' && *z <= '9') - i = i * 10 + (*z++ - '0'); - return i; -} - -/* I don't know of any way to pass an array to VxWorks. This function - can be called directly from gdb. */ - -vxmain (arg) -char *arg; -{ - char *argv[2]; - - argv[0] = ""; - argv[1] = arg; - main (2, argv, (char **) 0); -} - -#else /* ! vxworks */ -# include -# include -#endif /* ! vxworks */ +#include +#include #ifdef PROTOTYPES extern int marker1 (void); diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp index 1870ad5..af4dbda 100644 --- a/gdb/testsuite/gdb.base/break.exp +++ b/gdb/testsuite/gdb.base/break.exp @@ -949,10 +949,3 @@ gdb_test_no_output "set \$foo=81.5" \ gdb_test "break $srcfile:\$foo" \ "Convenience variables used in line specs must have integer values.*" \ "set breakpoint via non-integer convenience variable disallowed" - -# Reset the default arguments for VxWorks -if [istarget "*-*-vxworks*"] { - set timeout 10 - verbose "Timeout is now $timeout seconds" 2 - gdb_test_no_output "set args main" -} diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp index ab74bdb..c155bb9 100644 --- a/gdb/testsuite/gdb.base/default.exp +++ b/gdb/testsuite/gdb.base/default.exp @@ -412,14 +412,6 @@ gdb_test "pwd" "Working directory .*" "pwd" #test run "r" abbreviation if $use_gdb_stub { # Only extended-remote supports "run". -} elseif [istarget "*-*-vxworks*"] then { - gdb_test "set args" ".*" "" - - gdb_test "r" "Starting program: .* -You must specify a function name to run, and arguments if any"\ - "run \"r\" abbreviation" - gdb_test "set args main" ".*" "" - } else { gdb_test_multiple "r" "run \"r\" abbreviation" { -re "Starting program: .*You can't do that when your target is `None'.*$gdb_prompt $"\ @@ -442,13 +434,6 @@ You must specify a function name to run, and arguments if any"\ #test run if $use_gdb_stub { # Only extended-remote supports "run". -} elseif [istarget "*-*-vxworks*"] then { - gdb_test "set args" ".*" "" - - gdb_test "run" "Starting program: .* -You must specify a function name to run, and arguments if any" - gdb_test "set args main" ".*" "" - } else { gdb_test_multiple "run" "run" { -re "Starting program:.*You can't do that when your target is `None'.*$gdb_prompt $"\ diff --git a/gdb/testsuite/gdb.base/run.c b/gdb/testsuite/gdb.base/run.c index c7293ce..df54056 100644 --- a/gdb/testsuite/gdb.base/run.c +++ b/gdb/testsuite/gdb.base/run.c @@ -3,39 +3,8 @@ * testing stack backtraces and such. */ -#ifdef vxworks - -# include - -/* VxWorks does not supply atoi. */ -static int -atoi (z) - char *z; -{ - int i = 0; - - while (*z >= '0' && *z <= '9') - i = i * 10 + (*z++ - '0'); - return i; -} - -/* I don't know of any way to pass an array to VxWorks. This function - can be called directly from gdb. */ - -vxmain (arg) -char *arg; -{ - char *argv[2]; - - argv[0] = ""; - argv[1] = arg; - main (2, argv, (char **) 0); -} - -#else /* ! vxworks */ -# include -# include -#endif /* ! vxworks */ +#include +#include #ifdef PROTOTYPES int factorial (int); diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp index 769df73..249c6a3 100644 --- a/gdb/testsuite/gdb.base/scope.exp +++ b/gdb/testsuite/gdb.base/scope.exp @@ -499,11 +499,6 @@ proc test_at_localscopes {} { gdb_stop_suppressing_tests } -if [istarget "*-*-vxworks*"] { - set timeout 120 - verbose "Timeout is now $timeout seconds" 2 -} - # Test that variables in various segments print out correctly before # the program is run. @@ -536,8 +531,3 @@ if [runto foo] then { test_at_foo } if [runto bar] then { test_at_bar } if [runto localscopes] then { test_at_localscopes } if [runto autovars] then { test_at_autovars } - -if [istarget "*-*-vxworks*"] { - set timeout 120 - verbose "Timeout is now $timeout seconds" 2 -} diff --git a/gdb/testsuite/gdb.base/sepdebug.c b/gdb/testsuite/gdb.base/sepdebug.c index 671dfa5..21e6200 100644 --- a/gdb/testsuite/gdb.base/sepdebug.c +++ b/gdb/testsuite/gdb.base/sepdebug.c @@ -13,39 +13,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifdef vxworks - -# include - -/* VxWorks does not supply atoi. */ -static int -atoi (z) - char *z; -{ - int i = 0; - - while (*z >= '0' && *z <= '9') - i = i * 10 + (*z++ - '0'); - return i; -} - -/* I don't know of any way to pass an array to VxWorks. This function - can be called directly from gdb. */ - -vxmain (arg) -char *arg; -{ - char *argv[2]; - - argv[0] = ""; - argv[1] = arg; - main (2, argv, (char **) 0); -} - -#else /* ! vxworks */ -# include -# include -#endif /* ! vxworks */ +#include +#include /* * The following functions do nothing useful. They are included simply diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index c5e019b..b1ca433 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -713,14 +713,6 @@ proc test_different_dir {type test_different_dir xfail} { } } - - # Reset the default arguments for VxWorks - if [istarget "*-*-vxworks*"] { - set timeout 10 - verbose "Timeout is now $timeout seconds" 2 - gdb_test_no_output "set args main" - } - # proc test_different_dir } } diff --git a/gdb/testsuite/gdb.hp/gdb.aCC/run.c b/gdb/testsuite/gdb.hp/gdb.aCC/run.c index b41abab..60cc08e 100644 --- a/gdb/testsuite/gdb.hp/gdb.aCC/run.c +++ b/gdb/testsuite/gdb.hp/gdb.aCC/run.c @@ -3,39 +3,8 @@ * testing stack backtraces and such. */ -#ifdef vxworks - -# include - -/* VxWorks does not supply atoi. */ -static int -atoi (char *z) - /* char *z;*/ -{ - int i = 0; - - while (*z >= '0' && *z <= '9') - i = i * 10 + (*z++ - '0'); - return i; -} - -/* I don't know of any way to pass an array to VxWorks. This function - can be called directly from gdb. */ - -void vxmain (char *arg) -/*char *arg;*/ -{ - char *argv[2]; - - argv[0] = ""; - argv[1] = arg; - main (2, argv, (char **) 0); -} - -#else /* ! vxworks */ -# include -# include -#endif /* ! vxworks */ +#include +#include int main (int argc, char *argv[], char **envp) /*int argc; diff --git a/gdb/testsuite/gdb.reverse/until-reverse.c b/gdb/testsuite/gdb.reverse/until-reverse.c index 15cfa8d..28c71b2 100644 --- a/gdb/testsuite/gdb.reverse/until-reverse.c +++ b/gdb/testsuite/gdb.reverse/until-reverse.c @@ -15,39 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifdef vxworks - -# include - -/* VxWorks does not supply atoi. */ -static int -atoi (z) - char *z; -{ - int i = 0; - - while (*z >= '0' && *z <= '9') - i = i * 10 + (*z++ - '0'); - return i; -} - -/* I don't know of any way to pass an array to VxWorks. This function - can be called directly from gdb. */ - -vxmain (arg) -char *arg; -{ - char *argv[2]; - - argv[0] = ""; - argv[1] = arg; - main (2, argv, (char **) 0); -} - -#else /* ! vxworks */ -# include -# include -#endif /* ! vxworks */ +#include +#include #ifdef PROTOTYPES extern int marker1 (void); diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 937a949..ea8aa7d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2782,10 +2782,6 @@ proc gdb_compile {source dest type options} { } set options $new_options - if [target_info exists is_vxworks] { - set options2 { "additional_flags=-Dvxworks" } - set options [concat $options2 $options] - } if [info exists GDB_TESTCASE_OPTIONS] { lappend options "additional_flags=$GDB_TESTCASE_OPTIONS" }