This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] testsuite/gdb.c++/casts.exp: Fix to run also on embedded targets


Hi,

the following patch removes the usage of the "run" command from the
gdb.c++/casts.exp test.  This way it also runs on targets which don't
support "run" as a valid command (e.g. on embedded boards).

Ok to commit?

2003-03-27  Corinna Vinschen  <vinschen at redhat dot com>

	* gdb.c++/casts.exp: Fix startup to run also on embedded targets.

Index: gdb.c++/casts.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/casts.exp,v
retrieving revision 1.2
diff -u -p -r1.2 casts.exp
--- gdb.c++/casts.exp	4 Jan 2003 22:30:21 -0000	1.2
+++ gdb.c++/casts.exp	27 Mar 2003 09:38:52 -0000
@@ -55,11 +55,16 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
+if ![runto_main] then {
+    perror "couldn't run to breakpoint"
+    continue
+}
+
 gdb_test "break [gdb_get_line_number "casts.exp: 1"]" \
     "Breakpoint.*at.* file .*" \
     ""
 
-gdb_test "run" "Breakpoint .* at .*casts.cc.*" ""
+gdb_test "continue" "Breakpoint .* at .*casts.cc.*" ""
 
 # Casting a pointer to a base class to a pointer to a derived class
 # should yield the entire derived class.  Until August 2002, GDB got


-- 
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen at redhat dot com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]