Re: [RFA] gdb.trace, replace wildcard regexp

Michael Snyder
2010-06-11T22:47:09Z

Ulrich Weigand wrote:
> Michael Snyder wrote:
>
>> --- 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"
>
> This change also causes new FAILs for me:
>
> (gdb) PASS: gdb.trace/packetlen.exp: setup collect actions
> tstart^M
> You can't do that when your target is `child'^M
> (gdb) FAIL: gdb.trace/packetlen.exp: survive the long packet send
> break end^M
> Breakpoint 3 at 0x760: file /home/uweigand/fsf/gdb-head/gdb/testsuite/gdb.trace/actions.c, line 110.^M
> (gdb) continue^M
> Continuing.^M
> ^M
> Breakpoint 3, end () at /home/uweigand/fsf/gdb-head/gdb/testsuite/gdb.trace/actions.c:110^M
> 110 }^M
> (gdb) PASS: gdb.trace/packetlen.exp: run trace experiment
> tstop^M
> Trace is not running.^M
> (gdb) FAIL: gdb.trace/packetlen.exp: confirm: survived the long packet send

Yeah, but these ones really do fail, when the target can't do
tracepoints. They need to be run against gdbserver.

Odd, though, most of the trace tests bail early if the target
can't do tracepoints. They don't give arbitrary failures...