This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Fix testsuite gdb.base/bang.exp to work with remote targets
- From: Fred Fish <fnf at ninemoons dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: fnf at redhat dot com
- Date: Mon, 2 Feb 2004 13:26:08 -0700
- Subject: [RFA] Fix testsuite gdb.base/bang.exp to work with remote targets
- Reply-to: fnf at ninemoons dot com
When using a remote target, like SID, you have to "continue" after
a "gdb_load", not "run". Add support for this case.
2004-02-02 Fred Fish <fnf@redhat.com>
* gdb.base/bang.exp: Handling continuing on remote targets after a
load.
Index: gdb.base/bang.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/bang.exp,v
retrieving revision 1.1
diff -u -p -r1.1 bang.exp
--- gdb.base/bang.exp 24 Jun 2003 22:04:06 -0000 1.1
+++ gdb.base/bang.exp 2 Feb 2004 20:20:04 -0000
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 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
@@ -35,7 +35,10 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
# Verify that we can run the program and that it terminates normally.
-gdb_test "run" \
- ".*Program exited normally\." \
- "run program"
+# For remote targets we simply continue after loading.
+if [target_info exists use_gdb_stub] {
+ gdb_test "continue" ".*Program exited normally\." "run program"
+} else {
+ gdb_test "run" ".*Program exited normally\." "run program"
+}