From: Michael Snyder <msnyder@vmware.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [RFA] gdb.trace, replace wildcard regexp
Date: Fri, 04 Jun 2010 18:05:00 -0000 [thread overview]
Message-ID: <4C094058.8020504@vmware.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 66 bytes --]
This change replaces gdb_test foo "" ""
with gdb_test foo ".*" ""
[-- Attachment #2: re3.txt --]
[-- Type: text/plain, Size: 11082 bytes --]
2010-06-04 Michael Snyder <msnyder@vmware.com>
* gdb.trace/backtrace.exp: Use ".*" instead of "" as wildcard regexp.
* gdb.trace/circ.exp: Ditto.
* gdb.trace/collection.exp: Ditto.
* gdb.trace/packetlen.exp: Ditto.
* gdb.trace/passc-dyn.exp: Ditto.
* gdb.trace/report.exp: Ditto.
* gdb.trace/tfile.exp: Ditto.
* gdb.trace/tfind.exp: Ditto.
* gdb.trace/while-dyn.exp: Ditto.
Index: gdb.trace/backtrace.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/backtrace.exp,v
retrieving revision 1.16
diff -u -p -r1.16 backtrace.exp
--- gdb.trace/backtrace.exp 2 Jun 2010 19:41:11 -0000 1.16
+++ gdb.trace/backtrace.exp 4 Jun 2010 18:02:31 -0000
@@ -34,8 +34,8 @@ if { [gdb_compile "$srcdir/$subdir/$srcf
return -1
}
gdb_load $binfile
-gdb_test "tstop" "" ""
-gdb_test "tfind none" "" ""
+gdb_test "tstop" ".*" ""
+gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
@@ -164,14 +164,14 @@ gdb_trace_setactions "8.6: setup TP to c
"$tdp6" \
"collect $fpreg, \(\*\(void \*\*\) \($spreg\)\) @ 64" "^$"
-gdb_test "tstart" "" ""
+gdb_test "tstart" ".*" ""
-gdb_test "break end" "" ""
+gdb_test "break end" ".*" ""
gdb_test "continue" \
"Continuing.*Breakpoint $decimal, end.*" \
"run trace experiment"
-gdb_test "tstop" "" ""
+gdb_test "tstop" ".*" ""
proc gdb_backtrace_tdp_1 { msg } {
global gdb_prompt
@@ -337,4 +337,4 @@ gdb_test "printf \"x \%d x\\n\", depth =
"1.13: trace in recursion: depth not equal to 3"
# Finished!
-gdb_test "tfind none" "" ""
+gdb_test "tfind none" ".*" ""
Index: gdb.trace/circ.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/circ.exp,v
retrieving revision 1.15
diff -u -p -r1.15 circ.exp
--- gdb.trace/circ.exp 2 Jun 2010 21:55:28 -0000 1.15
+++ gdb.trace/circ.exp 4 Jun 2010 18:02:31 -0000
@@ -117,10 +117,10 @@ proc gdb_trace_circular_tests { } {
if [trace_buffer_normal] then { return 1; }
- gdb_test "break begin" "" ""
- gdb_test "break end" "" ""
- gdb_test "tstop" "" ""
- gdb_test "tfind none" "" ""
+ gdb_test "break begin" ".*" ""
+ gdb_test "break end" ".*" ""
+ gdb_test "tstop" ".*" ""
+ gdb_test "tfind none" ".*" ""
if [setup_tracepoints] then { return 1; }
@@ -213,4 +213,4 @@ if { ![gdb_trace_circular_tests] } then
}
# Finished!
-gdb_test "tfind none" "" ""
+gdb_test "tfind none" ".*" ""
Index: gdb.trace/collection.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/collection.exp,v
retrieving revision 1.19
diff -u -p -r1.19 collection.exp
--- gdb.trace/collection.exp 2 Jun 2010 19:41:11 -0000 1.19
+++ gdb.trace/collection.exp 4 Jun 2010 18:02:31 -0000
@@ -86,8 +86,8 @@ proc prepare_for_trace_test {} {
runto_main
- gdb_test "break begin" "" ""
- gdb_test "break end" "" ""
+ gdb_test "break begin" ".*" ""
+ gdb_test "break end" ".*" ""
}
proc run_trace_experiment { msg test_func } {
@@ -635,4 +635,4 @@ if { ![gdb_target_supports_trace] } then
gdb_trace_collection_test
# Finished!
-gdb_test "tfind none" "" ""
+gdb_test "tfind none" ".*" ""
Index: gdb.trace/packetlen.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/packetlen.exp,v
retrieving revision 1.14
diff -u -p -r1.14 packetlen.exp
--- gdb.trace/packetlen.exp 2 Jun 2010 21:55:28 -0000 1.14
+++ gdb.trace/packetlen.exp 4 Jun 2010 18:02:31 -0000
@@ -34,8 +34,8 @@ if { [gdb_compile "$srcdir/$subdir/$srcf
return -1
}
gdb_load $binfile
-gdb_test "tstop" "" ""
-gdb_test "tfind none" "" ""
+gdb_test "tstop" ".*" ""
+gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
@@ -48,7 +48,7 @@ gdb_reinitialize_dir $srcdir/$subdir
#
gdb_delete_tracepoints
-gdb_test "trace gdb_c_test" "" ""
+gdb_test "trace gdb_c_test" ".*" ""
gdb_trace_setactions "setup collect actions" \
"" \
"collect parm\[0\], parm\[1\], parm\[2\], parm\[3\]" "^$" \
@@ -61,7 +61,7 @@ gdb_trace_setactions "setup collect acti
"end" ""
gdb_test_no_output "tstart" "survive the long packet send"
-gdb_test "break end" "" ""
+gdb_test "break end" ".*" ""
gdb_test "continue" \
"Continuing.*Breakpoint $decimal, end.*" \
"run trace experiment"
Index: gdb.trace/passc-dyn.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/passc-dyn.exp,v
retrieving revision 1.15
diff -u -p -r1.15 passc-dyn.exp
--- gdb.trace/passc-dyn.exp 5 May 2010 18:07:04 -0000 1.15
+++ gdb.trace/passc-dyn.exp 4 Jun 2010 18:02:31 -0000
@@ -34,8 +34,8 @@ if { [gdb_compile "$srcdir/$subdir/$srcf
return -1
}
gdb_load $binfile
-gdb_test "tstop" "" ""
-gdb_test "tfind none" "" ""
+gdb_test "tstop" ".*" ""
+gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
@@ -93,45 +93,45 @@ gdb_test "passcount 2 $tdp3" "Setting tr
gdb_test "passcount 3 $tdp4" "Setting tracepoint $tdp4's passcount to 3" \
"4.5: set passcount for tracepoint $tdp4"
-gdb_test "tstart" "" ""
+gdb_test "tstart" ".*" ""
-gdb_test "break end" "" ""
+gdb_test "break end" ".*" ""
gdb_test "continue" \
"Continuing.*Breakpoint $decimal, end.*" \
"run trace experiment"
-gdb_test "tstop" "" ""
+gdb_test "tstop" ".*" ""
-gdb_test "tfind none" "" ""
+gdb_test "tfind none" ".*" ""
if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x -1 x" ""] {
untested passc-dyn.exp
return -1
}
-gdb_test "tfind tracepoint $tdp2" "" ""
+gdb_test "tfind tracepoint $tdp2" ".*" ""
if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 0 x" ""] {
untested passc-dyn.exp
return -1
}
-gdb_test "tfind tracepoint $tdp3" "" ""
+gdb_test "tfind tracepoint $tdp3" ".*" ""
if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 1 x" ""] {
untested passc-dyn.exp
return -1
}
-gdb_test "tfind tracepoint $tdp4" "" ""
+gdb_test "tfind tracepoint $tdp4" ".*" ""
if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 2 x" ""] {
untested passc-dyn.exp
return -1
}
-gdb_test "tfind tracepoint $tdp2" "" ""
+gdb_test "tfind tracepoint $tdp2" ".*" ""
if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 3 x" ""] {
untested passc-dyn.exp
return -1
}
-gdb_test "tfind tracepoint $tdp3" "" ""
+gdb_test "tfind tracepoint $tdp3" ".*" ""
if [gdb_test "printf \"x \%d x\\n\", \$trace_frame" "x 4 x" ""] {
untested passc-dyn.exp
return -1
@@ -144,5 +144,5 @@ if [gdb_test "printf \"x \%d x\\n\", \$t
gdb_test "tfind" "failed to find.*" "4.5: dynamic passcount test"
# Finished!
-gdb_test "tfind none" "" ""
+gdb_test "tfind none" ".*" ""
Index: gdb.trace/report.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/report.exp,v
retrieving revision 1.16
diff -u -p -r1.16 report.exp
--- gdb.trace/report.exp 2 Jun 2010 19:41:11 -0000 1.16
+++ gdb.trace/report.exp 4 Jun 2010 18:02:31 -0000
@@ -34,8 +34,8 @@ if { [gdb_compile "$srcdir/$subdir/$srcf
return -1
}
gdb_load $binfile
-gdb_test "tstop" "" ""
-gdb_test "tfind none" "" ""
+gdb_test "tstop" ".*" ""
+gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
@@ -180,14 +180,14 @@ gdb_trace_setactions "9.x: setup TP to c
"$tdp6" \
"collect gdb_char_test, gdb_short_test, gdb_long_test" "^$"
-gdb_test "tstart" "" ""
+gdb_test "tstart" ".*" ""
-gdb_test "break end" "" ""
+gdb_test "break end" ".*" ""
gdb_test "continue" \
"Continuing.*Breakpoint $decimal, end.*" \
"run trace experiment"
-gdb_test "tstop" "" ""
+gdb_test "tstop" ".*" ""
#
# 9.1 test the tdump command
Index: gdb.trace/tfile.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/tfile.exp,v
retrieving revision 1.7
diff -u -p -r1.7 tfile.exp
--- gdb.trace/tfile.exp 5 May 2010 18:07:04 -0000 1.7
+++ gdb.trace/tfile.exp 4 Jun 2010 18:02:31 -0000
@@ -52,13 +52,13 @@ gdb_load $binfile
runto_main
-gdb_test "break done_making_trace_files" "" ""
+gdb_test "break done_making_trace_files" ".*" ""
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
# tsave command would be tested here...
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
# Program has presumably exited, now target a trace file it created.
Index: gdb.trace/tfind.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/tfind.exp,v
retrieving revision 1.21
diff -u -p -r1.21 tfind.exp
--- gdb.trace/tfind.exp 3 Jun 2010 23:54:18 -0000 1.21
+++ gdb.trace/tfind.exp 4 Jun 2010 18:02:31 -0000
@@ -36,8 +36,8 @@ if { [gdb_compile "$srcdir/$subdir/$srcf
return -1
}
gdb_load $binfile
-gdb_test "tstop" "" ""
-gdb_test "tfind none" "" ""
+gdb_test "tstop" ".*" ""
+gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
@@ -111,7 +111,7 @@ gdb_test "tstatus" "\[Tt\]race is runnin
# 6.2 test help tstart
gdb_test "help tstart" "Start trace data collection." "6.2: help tstart"
-gdb_test "break end" "" ""
+gdb_test "break end" ".*" ""
gdb_test "continue" \
"Continuing.*Breakpoint $decimal, end.*" \
"run trace experiment"
Index: gdb.trace/while-dyn.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.trace/while-dyn.exp,v
retrieving revision 1.16
diff -u -p -r1.16 while-dyn.exp
--- gdb.trace/while-dyn.exp 5 May 2010 18:07:04 -0000 1.16
+++ gdb.trace/while-dyn.exp 4 Jun 2010 18:02:31 -0000
@@ -35,8 +35,8 @@ if { [gdb_compile "$srcdir/$subdir/$srcf
return -1
}
gdb_load $binfile
-gdb_test "tstop" "" ""
-gdb_test "tfind none" "" ""
+gdb_test "tstop" ".*" ""
+gdb_test "tfind none" ".*" ""
runto_main
gdb_reinitialize_dir $srcdir/$subdir
@@ -67,8 +67,8 @@ proc test_while_stepping { while_steppin
clean_restart $executable
- gdb_test "tstop" "" ""
- gdb_test "tfind none" "" ""
+ gdb_test "tstop" ".*" ""
+ gdb_test "tfind none" ".*" ""
runto_main
## verify number of trace frames collected matches stepcount
@@ -86,14 +86,14 @@ proc test_while_stepping { while_steppin
"end" "^$" \
"end" ""
- gdb_test "tstart" "" ""
+ gdb_test "tstart" ".*" ""
- gdb_test "break end" "" ""
+ gdb_test "break end" ".*" ""
gdb_test "continue" \
"Continuing.*Breakpoint $decimal, end.*" \
"$while_stepping: run trace experiment"
- gdb_test "tstop" "" ""
+ gdb_test "tstop" ".*" ""
gdb_tfind_test "$while_stepping: frame 5 should be the last one collected" "5" "5"
@@ -107,7 +107,7 @@ proc test_while_stepping { while_steppin
}
}
- gdb_test "tfind none" "" ""
+ gdb_test "tfind none" ".*" ""
}
# Test all while-stepping aliases.
next reply other threads:[~2010-06-04 18:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 18:05 Michael Snyder [this message]
2010-06-08 23:00 ` Michael Snyder
2010-06-11 17:02 ` Ulrich Weigand
2010-06-11 22:47 ` Michael Snyder
2010-06-11 23:30 ` Ulrich Weigand
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=4C094058.8020504@vmware.com \
--to=msnyder@vmware.com \
--cc=gdb-patches@sourceware.org \
/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