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]

[RFA] lib/gdb.exp: use board timeout


The appended patch causes gdb_test to use the [target_info gdb,timeout] if
it exists, just like gdb_expect does.  This makes board description
statements like the following more effective:

  set board_info($board,gdb,timeout) 240

There are no regressions on i686-pc-linux-gnu or sparc-sun-solaris2.5.1.
Okay to apply?

ChangeLog:

	* lib/gdb.exp (gdb_test): Override timeout with board info.

Nick

Index: gdb/testsuite/lib/gdb.exp
===================================================================
diff -up gdb/testsuite/lib/gdb.exp gdb/testsuite/lib/gdb.exp
--- gdb/testsuite/lib/gdb.exp	Thu Nov 16 19:29:03 2000
+++ gdb/testsuite/lib/gdb.exp	Thu Nov 16 19:28:53 2000
@@ -447,14 +447,18 @@ proc gdb_test { args } {
 	}
     }
 
-    if [info exists timeout] {
-	set tmt $timeout;
+    if [target_info exists gdb,timeout] {
+	set tmt [target_info gdb,timeout];
     } else {
-	global timeout;
 	if [info exists timeout] {
 	    set tmt $timeout;
 	} else {
-	    set tmt 60;
+	    global timeout;
+	    if [info exists timeout] {
+		set tmt $timeout;
+	    } else {
+		set tmt 60;
+	    }
 	}
     }
     gdb_expect $tmt {

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