Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Extra diagnostic for tests
@ 2006-09-13  9:52 Vladimir Prus
  2006-09-13 10:20 ` Mark Kettenis
  2006-09-16 11:19 ` Vladimir Prus
  0 siblings, 2 replies; 7+ messages in thread
From: Vladimir Prus @ 2006-09-13  9:52 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]


Hi,
at the moment, the dejagnu tests use PATH to find the gdb binary, and don't 
report which gdb binary is used. As result, when running runtest manually on 
one test, one can test with different gdb from the one used by 'make check'.

The attached patch makes gdb print to log file the location of gdb, and also 
makes sure invocation parameters are always printed to log file. While we're 
on it, the 'serialport' parameter to 'target' command is also reported.

OK?

- Volodya

2006-09-13  Vladimir Prus  <vladimir@codesourcery.com>

	* lib/gdb.exp (default_gdb_start): Always add
	invocation command to log file. Report the location where
	gdb was found.

	* lib/gdbserver-support.exp (gdb_target_cmd): Report
	the serialport on connection, not just target kind.

[-- Attachment #2: gdb_testing_diagnostics.diff --]
[-- Type: text/x-diff, Size: 1876 bytes --]

Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.70
diff -u -r1.70 gdb.exp
--- lib/gdb.exp	18 Aug 2006 18:34:18 -0000	1.70
+++ lib/gdb.exp	13 Sep 2006 09:45:24 -0000
@@ -1087,7 +1087,7 @@
 
     gdb_stop_suppressing_tests;
 
-    verbose "Spawning $GDB -nw $GDBFLAGS"
+    verbose -log "Spawning $GDB -nw $GDBFLAGS"
 
     if [info exists gdb_spawn_id] {
 	return 0;
@@ -1097,6 +1097,8 @@
 	if { [which $GDB] == 0 } then {
 	    perror "$GDB does not exist."
 	    exit 1
+	} else {
+            verbose -log "GDB found at [which $GDB]"
 	}
     }
     set res [remote_spawn host "$GDB -nw $GDBFLAGS [host_info gdb_opts]"];
Index: lib/gdbserver-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdbserver-support.exp,v
retrieving revision 1.1
diff -u -r1.1 gdbserver-support.exp
--- lib/gdbserver-support.exp	8 Apr 2005 12:57:00 -0000	1.1
+++ lib/gdbserver-support.exp	13 Sep 2006 09:45:24 -0000
@@ -55,19 +55,19 @@
 		verbose "Connection failed"
 	    }
 	    -re "Remote MIPS debugging.*$gdb_prompt" {
-		verbose "Set target to $targetname"
+		verbose "Set target to '$targetname $serialport'"
 		return 0
 	    }
 	    -re "Remote debugging using .*$serialport.*$gdb_prompt" {
-		verbose "Set target to $targetname"
+                verbose "Set target to '$targetname $serialport'"
 		return 0
 	    }
 	    -re "Remote target $targetname connected to.*$gdb_prompt" {
-		verbose "Set target to $targetname"
+		verbose "Set target to '$targetname $serialport'"
 		return 0
 	    }
 	    -re "Connected to.*$gdb_prompt" { 
-		verbose "Set target to $targetname"
+                verbose "Set target to '$targetname $serialport'"
 		return 0
 	    }
 	    -re "Ending remote.*$gdb_prompt" { }

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-09-23 16:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-13  9:52 Extra diagnostic for tests Vladimir Prus
2006-09-13 10:20 ` Mark Kettenis
2006-09-13 12:24   ` Daniel Jacobowitz
2006-09-13 17:58   ` Michael Snyder
2006-09-16 11:19 ` Vladimir Prus
2006-09-16 14:20   ` Daniel Jacobowitz
2006-09-23 16:55   ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox