Regression for gdb.base/stap-probe.exp (and some others) [Re: [patch] Have gdb_breakpoint call pass]

dje@google.com dje@google.com
Mon Oct 15 17:41:00 GMT 2012


Jan Kratochvil writes:
 > On Mon, 01 Oct 2012 18:49:21 +0200, dje@google.com wrote:
 > > 2012-10-01  Doug Evans  <dje@google.com>
 > > 
 > > 	* lib/gdb.exp (gdb_breakpoint): Fix varargs scan.
 > > 	Recognize "message" -> print pass and fail.  Add eof case.
 > > 	(runto): Recognize message, no-message.  Print pass/fail if requested,
 > > 	with same treatment as gdb_breakpoint.
 > > 	(runto_main): Pass no-message to runto.
 > > 	(gdb_internal_error_resync): Add log message.
 > > 	(gdb_file_cmd): Tweak internal error fail text for consistency.
 > 
 >  Running gdb/testsuite/gdb.base/stap-probe.exp ...
 >  PASS: gdb.base/stap-probe.exp: without semaphore, not optimized: check argument not at probe point
 >  PASS: gdb.base/stap-probe.exp: without semaphore, not optimized: info probes stap
 > -PASS: gdb.base/stap-probe.exp: without semaphore, not optimized: run to -pstap test:user
 > +FAIL: gdb.base/stap-probe.exp: without semaphore, not optimized: run to -pstap test:user
 > [...]
 > (many of PASS->FAIL for gdb.base/stap-probe.exp)

This test doesn't run on the ubuntu box I was testing on, but oh well.

This patch fixes stap-probe.exp on the Fedora box I tested on.
I didn't test jmisc.exp but it is likely the same issue.
Committed.

2012-10-15  Doug Evans  <dje@google.com>

	* lib/gdb.exp (runto): Fix call to gdb_breakpoint.

Index: gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.219
diff -u -p -r1.219 gdb.exp
--- gdb.exp	11 Oct 2012 15:59:57 -0000	1.219
+++ gdb.exp	15 Oct 2012 17:33:54 -0000
@@ -460,7 +460,10 @@ proc runto { function args } {
 
     # We need to use eval here to pass our varargs args to gdb_breakpoint
     # which is also a varargs function.
-    if ![eval gdb_breakpoint $function $args] {
+    # But we also have to be careful because $function may have multiple
+    # elements, and we don't want Tcl to move the remaining elements after
+    # the first to $args.  That is why $function is wrapped in {}.
+    if ![eval gdb_breakpoint {$function} $args] {
 	return 0;
     }
 



More information about the Gdb-patches mailing list