summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.gdb
diff options
context:
space:
mode:
authorMichael Chastain <mec.gnu@mindspring.com>2004-08-28 23:55:48 +0000
committerMichael Chastain <mec.gnu@mindspring.com>2004-08-28 23:55:48 +0000
commit99df31817d9562113e59a55e816f9f73878f7bd4 (patch)
treecb4b4fdb42786557efffc3eb74f23cbbd26d5ead /gdb/testsuite/gdb.gdb
parentae0904f933208e068208d41bcdf69aa243cd0a38 (diff)
downloadgdb-99df31817d9562113e59a55e816f9f73878f7bd4.tar.gz
2004-08-27 Michael Chastain <mec.gnu@mindspring.com>
With code from Manoj Iyer <manjo@austin.ibm.com>: * lib/gdb.exp (gdb_file_cmd): Return more information in the return value. Add an arm for "no debugging symbols found". Change a stray "error" to "perror". (gdb_run_cmd): Adapt to new return value. * gdb.base/remote.exp: Adapt to new return value. * gdb.gdb/complaints.exp: Likewise. * gdb.gdb/observer.exp: Likewise. * gdb.gdb/selftest.exp: Likewise. * gdb.gdb/xfullpath.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.gdb')
-rw-r--r--gdb/testsuite/gdb.gdb/complaints.exp18
-rw-r--r--gdb/testsuite/gdb.gdb/observer.exp11
-rw-r--r--gdb/testsuite/gdb.gdb/selftest.exp14
-rw-r--r--gdb/testsuite/gdb.gdb/xfullpath.exp18
4 files changed, 28 insertions, 33 deletions
diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp
index 3d3426f2474..719065f60d3 100644
--- a/gdb/testsuite/gdb.gdb/complaints.exp
+++ b/gdb/testsuite/gdb.gdb/complaints.exp
@@ -1,5 +1,5 @@
-# Copyright 2002
-# Free Software Foundation, Inc.
+# Copyright 2002, 2004
+# 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
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Andrew Cagney (cagney at redhat dot com),
# derived from xfullpath.exp (written by Joel Brobecker), derived from
# selftest.exp (written by Rob Savoye).
@@ -51,14 +48,15 @@ proc setup_test { executable } {
set oldtimeout $timeout
set timeout 600
verbose "Timeout is now $timeout seconds" 2
- if {[gdb_load $executable] <0} then {
- set timeout $oldtimeout
- verbose "Timeout is now $timeout seconds" 2
- return -1
- }
+
+ set result [gdb_load $executable]
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
+ if { [lindex $result 0] != "" } then {
+ return -1
+ }
+
# Set a breakpoint at main
gdb_test "break captured_command_loop" \
"Breakpoint.*at.* file.*, line.*" \
diff --git a/gdb/testsuite/gdb.gdb/observer.exp b/gdb/testsuite/gdb.gdb/observer.exp
index 5b466e62bc0..a012387b5f7 100644
--- a/gdb/testsuite/gdb.gdb/observer.exp
+++ b/gdb/testsuite/gdb.gdb/observer.exp
@@ -46,14 +46,15 @@ proc setup_test { executable } {
set oldtimeout $timeout
set timeout 600
verbose "Timeout is now $timeout seconds" 2
- if {[gdb_load $executable] <0} then {
- set timeout $oldtimeout
- verbose "Timeout is now $timeout seconds" 2
- return -1
- }
+
+ set result [gdb_load $executable]
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
+ if { [lindex $result 0] != "" } then {
+ return -1
+ }
+
# Set a breakpoint at main
gdb_test "break captured_main" \
"Breakpoint.*at.* file.*, line.*" \
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp
index 54105d211cb..02ad80635ee 100644
--- a/gdb/testsuite/gdb.gdb/selftest.exp
+++ b/gdb/testsuite/gdb.gdb/selftest.exp
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Rob Savoye. (rob@cygnus.com)
if $tracelevel then {
@@ -243,14 +240,15 @@ proc test_with_self { executable } {
set oldtimeout $timeout
set timeout 600
verbose "Timeout is now $timeout seconds" 2
- if {[gdb_load $executable] <0} then {
- set timeout $oldtimeout
- verbose "Timeout is now $timeout seconds" 2
- return -1
- }
+
+ set result [gdb_load $executable]
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
+ if { [lindex $result 0] != "" } then {
+ return -1
+ }
+
# disassemble yourself
gdb_test "x/10i main" \
"x/10i.*main.*main.$decimal.*main.$decimal.*" \
diff --git a/gdb/testsuite/gdb.gdb/xfullpath.exp b/gdb/testsuite/gdb.gdb/xfullpath.exp
index 60449a343c5..bc3dc45139e 100644
--- a/gdb/testsuite/gdb.gdb/xfullpath.exp
+++ b/gdb/testsuite/gdb.gdb/xfullpath.exp
@@ -1,5 +1,5 @@
-# Copyright 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004
+# 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
@@ -15,9 +15,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
# This file was written by Joel Brobecker. (brobecker@gnat.com), derived
# from selftest.exp, written by Rob Savoye.
@@ -50,14 +47,15 @@ proc setup_test { executable } {
set oldtimeout $timeout
set timeout 600
verbose "Timeout is now $timeout seconds" 2
- if {[gdb_load $executable] <0} then {
- set timeout $oldtimeout
- verbose "Timeout is now $timeout seconds" 2
- return -1
- }
+
+ set result [gdb_load $executable]
set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2
+ if { [lindex $result 0] != "" } then {
+ return -1
+ }
+
# Set a breakpoint at main
gdb_test "break captured_main" \
"Breakpoint.*at.* file.*, line.*" \