+2010-06-08 Michael Snyder <msnyder@vmware.com>
+
+ * gdb.ada/exec_changed.exp:
+ Use ".*" instead of "" as wildcard regexp.
+
+ * gdb.base/async.exp: Use ".*" instead of "" as wildcard regexp.
+ * gdb.base/call-ar-st.exp: Ditto.
+ * gdb.base/checkpoint.exp: Ditto.
+ * gdb.base/default.exp: Ditto.
+ * gdb.base/dump.exp: Ditto.
+ * gdb.base/ending-run.exp: Ditto.
+ * gdb.base/fileio.exp: Ditto.
+ * gdb.base/miscexprs.exp: Ditto.
+ * gdb.base/pointers.exp: Ditto.
+ * gdb.base/readline.exp: Ditto.
+ * gdb.base/reread.exp: Ditto.
+ * gdb.base/restore.exp: Ditto.
+ * gdb.base/shlib-call.exp: Ditto.
+ * gdb.base/valgrind-db-attach.exp: Ditto.
+ * gdb.base/volatile.exp: Ditto.
+ * gdb.base/watchpoints.exp: Ditto.
+
+ * gdb.cp/classes.exp: Use ".*" instead of "" as wildcard regexp.
+
+ * gdb.python/py-frame.exp: Use ".*" instead of "" as wildcard regexp.
+ * gdb.python/py-value.exp: Ditto.
+
+ * 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.
+
2010-06-08 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.python/python.exp (pythonX.Y/lib-dynload/*.so): New.
# Load the first executable.
-gdb_test "shell mv ${binfile1} ${binfile}" "" ""
+gdb_test "shell mv ${binfile1} ${binfile}" ".*" ""
gdb_load ${binfile}
# Start the program, we should land in the program main procedure
# second executable into its place. Ensure that the new
# executable is at least a second newer than the old.
-gdb_test "shell mv ${binfile} ${binfile1}" "" ""
-gdb_test "shell mv ${binfile2} ${binfile}" "" ""
-gdb_test "shell sleep 1" "" ""
-gdb_test "shell touch ${binfile}" "" ""
+gdb_test "shell mv ${binfile} ${binfile1}" ".*" ""
+gdb_test "shell mv ${binfile2} ${binfile}" ".*" ""
+gdb_test "shell sleep 1" ".*" ""
+gdb_test "shell touch ${binfile}" ".*" ""
# Start the program a second time, GDB should land in procedure Second
# this time.
continue
}
-gdb_test "break baz" "" ""
+gdb_test "break baz" ".*" ""
#
# Make sure we get a 'completed' message when the target is done.
#
-gdb_test "set display-exec-done on" "" ""
+gdb_test "set display-exec-done on" ".*" ""
send_gdb "next&\n"
timeout { fail "(timeout) until &" }
}
-gdb_test "set display-exec-done off" "" ""
+gdb_test "set display-exec-done off" ".*" ""
unset_board_info "gdb_protocol"
set_board_info "gdb_protocol" "remote"
"\[ \t\r\n\]+1216.*print_double_array\\(double_array\\)"
}
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
# I am disabling this test, because it takes too long. I verified by
".*main \\(\\) at .*call-ar-st.c:1220\[ \t\r\n\]+.*print_all_arrays\\(integer_array, char_array, float_array, double_array\\)."
}
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
#step
"array_i :.*307.*print_char_array.*" \
"next over print_int_array in print-all_arrays"
} else {
- gdb_test "next" "" ""
+ gdb_test "next" ".*" ""
}
#call print_double_array(array_d)
"\[ \t\r\n\]+.*HELLO WORLD.*main \\(\\) at .*call-ar-st.c:1236.*printf\\(.BYE BYE FOR NOW.n.\\)."
}
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
"BYE BYE FOR NOW.*1237.*printf\\(.VERY GREEN GRASS.n.\\);.*" \
"next to 1237"
} else {
- gdb_test "next" "" ""
+ gdb_test "next" ".*" ""
}
#call print_array_rep(\*list1, \*list2, \*list3)
"Continuing\\..*Sum of 4 arrays.*Contents of linked list1.*Contents of two_floats_t.*main \\(\\) at .*call-ar-st.c:1281.*c = 0.*" \
"continue to 1281"
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
#call print_small_structs(*struct1, *struct2, *struct3, *struct4,
gdb_test "continue" "Continuing\\..*Contents of two_floats_t:.*main \\(\\) at.*call-ar-st.c:1300.*1300.*init_bit_flags_combo\\(flags_combo, \\(unsigned\\)1, \\(unsigned\\)0, .y.,.*" \
"continue to 1300"
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
#step
gdb_breakpoint $break1_loc
gdb_test "continue" "breakpoint 1.*" "break1 start"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 two"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 three"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 four"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 five"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 six"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 seven"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 eight"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 nine"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "continue 10" "breakpoint 1.*" "break1 ten"
-gdb_test "checkpoint" "" ""
+gdb_test "checkpoint" ".*" ""
gdb_test "info checkpoints" \
" 10 .* 9 .* 8 .* 7 .* 6 .* 5 .* 4 .* 3 .* 2 .* 1 .*" \
gdb_breakpoint $break1_loc
gdb_test "restart 1" "Switching to .*c == EOF.*" "restart 1 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 100" "breakpoint 1.*" "breakpoint 1 1 one"
gdb_test "step" "if .c == EOF.*" "step in 1 two"
gdb_test "print lines" " = 102.*" "verify lines 1 two"
gdb_test "restart 2" "Switching to .*c == EOF.*" "restart 2 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 100" "breakpoint 1.*" "breakpoint 1 2 one"
gdb_test "step" "if .c == EOF.*" "step in 2 two"
gdb_test "print lines" " = 112.*" "verify lines 2 two"
gdb_test "restart 3" "Switching to .*c == EOF.*" "restart 3 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 500" "breakpoint 1.*" "breakpoint 1 3 one"
gdb_test "step" "if .c == EOF.*" "step in 3 two"
gdb_test "print lines" " = 522.*" "verify lines 3 two"
gdb_test "restart 4" "Switching to .*c == EOF.*" "restart 4 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 500" "breakpoint 1.*" "breakpoint 1 4 one"
gdb_test "step" "if .c == EOF.*" "step in 4 two"
gdb_test "print lines" " = 532.*" "verify lines 4 two"
gdb_test "restart 5" "Switching to .*c == EOF.*" "restart 5 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 1000" "breakpoint 1.*" "breakpoint 1 5 one"
gdb_test "step" "if .c == EOF.*" "step in 5 two"
gdb_test "print lines" " = 1042.*" "verify lines 5 two"
gdb_test "restart 6" "Switching to .*c == EOF.*" "restart 6 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 1000" "breakpoint 1.*" "breakpoint 1 6 one"
gdb_test "step" "if .c == EOF.*" "step in 6 two"
gdb_test "print lines" " = 1052.*" "verify lines 5 two"
gdb_test "restart 7" "Switching to .*c == EOF.*" "restart 7 two"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
gdb_test "continue 1100" "breakpoint 1.*" "breakpoint 1 7 one"
gdb_test "step" "if .c == EOF.*" "step in 7 two"
gdb_test "print lines" " = 1162.*" "verify lines 7 two"
#test run "r" abbreviation
if [istarget "*-*-vxworks*"] then {
- gdb_test "set args" "" ""
+ gdb_test "set args" ".*" ""
gdb_test "r" "Starting program: .*
You must specify a function name to run, and arguments if any"\
"run \"r\" abbreviation"
- gdb_test "set args main" "" ""
+ gdb_test "set args main" ".*" ""
} else {
gdb_test_multiple "r" "run \"r\" abbreviation" {
#test run
if [istarget "*-*-vxworks*"] then {
- gdb_test "set args" "" ""
+ gdb_test "set args" ".*" ""
gdb_test "run" "Starting program: .*
You must specify a function name to run, and arguments if any"
- gdb_test "set args main" "" ""
+ gdb_test "set args main" ".*" ""
} else {
gdb_test_multiple "run" "run" {
gdb_test "print intarray\[4\] == 0" " = 1" "element 4 not changed - 4"
if ![string compare $is64bitonly "no"] then {
- gdb_test "print zero_all ()" "" ""
+ gdb_test "print zero_all ()" ".*" ""
# restore with expressions
test_restore_saved_value \
gdb_test "next" ".*Goodbye!.*32.*" \
"Step to return"
} else {
- gdb_test "next" "" ""
+ gdb_test "next" ".*" ""
}
set old_timeout $timeout
"Continuing\\..*open 4:.*ENOENT$stop_msg" \
"Opening nonexistant file returns ENOENT"
-gdb_test "continue" "" ""
+gdb_test "continue" ".*" ""
catch "system \"chmod -f -w nowrt.fileio.test\""
continue
}
-gdb_test "break marker1" "" ""
+gdb_test "break marker1" ".*" ""
gdb_test "cont" \
"Break.* marker1 \\(\\) at .*:$decimal.*" \
# with elementary type variables and pointers.
#
-gdb_test "break marker1" "" ""
+gdb_test "break marker1" ".*" ""
gdb_test "cont" "Break.* marker1 \\(\\) at .*:$decimal.*" \
continue to marker1"
gdb_test "up" "more_code.*" "up from marker1"
}
# Match the prompt so the next test starts at the right place.
- gdb_test "" "" "$name - final prompt"
+ gdb_test "" ".*" "$name - final prompt"
return 1
}
# Load the first executable.
-gdb_test "shell mv ${binfile1} ${binfile}" "" ""
+gdb_test "shell mv ${binfile1} ${binfile}" ".*" ""
gdb_load ${binfile}
# Set a breakpoint at foo
# second executable into its place. Ensure that the new
# executable is at least a second newer than the old.
-gdb_test "shell mv ${binfile} ${binfile1}" "" ""
-gdb_test "shell mv ${binfile2} ${binfile}" "" ""
-gdb_test "shell sleep 1" "" ""
-gdb_test "shell touch ${binfile}" "" ""
+gdb_test "shell mv ${binfile} ${binfile1}" ".*" ""
+gdb_test "shell mv ${binfile2} ${binfile}" ".*" ""
+gdb_test "shell sleep 1" ".*" ""
+gdb_test "shell touch ${binfile}" ".*" ""
# Run a second time; GDB should detect that the executable has changed
# and reset the breakpoints correctly.
} else {
# Put the older executable back in place.
- gdb_test "shell mv ${binfile} ${binfile2}" "" ""
- gdb_test "shell mv ${binfile1} ${binfile}" "" ""
+ gdb_test "shell mv ${binfile} ${binfile2}" ".*" ""
+ gdb_test "shell mv ${binfile1} ${binfile}" ".*" ""
# Restart GDB entirely.
gdb_start
# Now move the newer executable into place, and re-run. GDB
# should still notice that the executable file has changed,
# and still re-set the breakpoint appropriately.
- gdb_test "shell mv ${binfile} ${binfile1}" "" ""
- gdb_test "shell mv ${binfile2} ${binfile}" "" ""
+ gdb_test "shell mv ${binfile} ${binfile1}" ".*" ""
+ gdb_test "shell mv ${binfile2} ${binfile}" ".*" ""
gdb_run_cmd
gdb_expect {
-re ".*Breakpoint.* foo .* at .*:9.*$gdb_prompt $" {
}
}
} else {
- gdb_test "continue" "" ""
+ gdb_test "continue" ".*" ""
}
}
"address of sgs is $hex.*g = shr2\\(g\\);" \
"next over shr1"
} else {
- gdb_test "next" "" ""
+ gdb_test "next" ".*" ""
}
}
}
-gdb_test "" "" "eat first prompt"
+gdb_test "" ".*" "eat first prompt"
# Initialization from default_gdb_start.
gdb_test_no_output "set height 0"
}
}
-gdb_test "break marker1" "" ""
+gdb_test "break marker1" ".*" ""
gdb_test_multiple "cont" "continue to marker1" {
-re "Break.* marker1 \\(\\) at .*:$decimal.*$gdb_prompt $" {
}
runto_main
- gdb_test "watch ival1" "" ""
- gdb_test "watch ival3" "" ""
+ gdb_test "watch ival1" ".*" ""
+ gdb_test "watch ival3" ".*" ""
set prev_timeout $timeout
set timeout 600
# are any more instructions to finish the function call.
gdb_test_multiple "finish" "" {
-re "enums2 \\(\\);.*$gdb_prompt $" {
- gdb_test "next" "" ""
+ gdb_test "next" ".*" ""
}
-re "$gdb_prompt $" { }
}
test_enums
- gdb_test "finish" "" ""
+ gdb_test "finish" ".*" ""
test_pointers_to_class_members
test_static_members
gdb_breakpoint "f2"
gdb_continue_to_breakpoint "breakpoint at f2"
-gdb_test "up" "" ""
+gdb_test "up" ".*" ""
gdb_py_test_silent_cmd "python f1 = gdb.selected_frame ()" "get second frame" 0
gdb_py_test_silent_cmd "python f0 = f1.newer ()" "get first frame" 0
# Test pointer arithmethic
# First, obtain the pointers
- gdb_test "print (void *) 2" "" ""
+ gdb_test "print (void *) 2" ".*" ""
gdb_test_no_output "python a = gdb.history (0)" ""
- gdb_test "print (void *) 5" "" ""
+ gdb_test "print (void *) 5" ".*" ""
gdb_test_no_output "python b = gdb.history (0)" ""
gdb_test "python print 'result = ' + str(a+5)" " = 0x7" "add pointer value with python integer"
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
"$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
"1.13: trace in recursion: depth not equal to 3"
# Finished!
-gdb_test "tfind none" "" ""
+gdb_test "tfind none" ".*" ""
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; }
}
# Finished!
-gdb_test "tfind none" "" ""
+gdb_test "tfind none" ".*" ""
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 } {
gdb_trace_collection_test
# Finished!
-gdb_test "tfind none" "" ""
+gdb_test "tfind none" ".*" ""
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
#
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\]" "^$" \
"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"
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
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
gdb_test "tfind" "failed to find.*" "4.5: dynamic passcount test"
# Finished!
-gdb_test "tfind none" "" ""
+gdb_test "tfind none" ".*" ""
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
"$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
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.
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
# 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"
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
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
"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"
}
}
- gdb_test "tfind none" "" ""
+ gdb_test "tfind none" ".*" ""
}
# Test all while-stepping aliases.