Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Extra diagnostic for tests
Date: Wed, 13 Sep 2006 09:52:00 -0000	[thread overview]
Message-ID: <200609131352.16082.vladimir@codesourcery.com> (raw)

[-- 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" { }

             reply	other threads:[~2006-09-13  9:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-13  9:52 Vladimir Prus [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609131352.16082.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox