This is the mail archive of the gdb-patches@sourceware.org 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]

RFC: Remove gdb_cmd from testsuite


Does anyone see why I should not commit this patch?

IIRC, I've hit the race condition caused by this static filename; it
leads to WARNINGs and timeouts at the end of a testsuite run if
gdb.base and gdb.cp write the file at the same time.  This seems to
work identically, and avoids the temporary file.

-- 
Daniel Jacobowitz
CodeSourcery

2009-11-05  Daniel Jacobowitz  <dan@codesourcery.com>

	* lib/gdb.exp (default_gdb_version): Use --version instead of
	--command.

Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.124
diff -u -p -r1.124 gdb.exp
--- lib/gdb.exp	2 Nov 2009 17:28:16 -0000	1.124
+++ lib/gdb.exp	5 Nov 2009 20:54:48 -0000
@@ -104,13 +104,7 @@ proc default_gdb_version {} {
     global GDB
     global INTERNAL_GDBFLAGS GDBFLAGS
     global gdb_prompt
-    set fileid [open "gdb_cmd" w];
-    puts $fileid "q";
-    close $fileid;
-    set cmdfile [remote_download host "gdb_cmd"];
-    set output [remote_exec host "$GDB $INTERNAL_GDBFLAGS --command $cmdfile"]
-    remote_file build delete "gdb_cmd";
-    remote_file host delete "$cmdfile";
+    set output [remote_exec host "$GDB $INTERNAL_GDBFLAGS --version"]
     set tmp [lindex $output 1];
     set version ""
     regexp " \[0-9\]\[^ \t\n\r\]+" "$tmp" version


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