This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] store trace default-collect to target [6/6] test
- From: Hui Zhu <teawater at gmail dot com>
- To: gdb-patches ml <gdb-patches at sourceware dot org>
- Cc: Hui Zhu <hui_zhu at mentor dot com>, Yao Qi <yao at codesourcery dot com>
- Date: Mon, 13 May 2013 14:05:09 +0800
- Subject: Re: [PATCH] store trace default-collect to target [6/6] test
- References: <51665508 dot 5050706 at mentor dot com> <516655FC dot 6070206 at mentor dot com> <51666686 dot 7090203 at codesourcery dot com> <516668F3 dot 3030405 at mentor dot com> <5166722F dot 2000709 at codesourcery dot com> <CANFwon2ohZ+6g5TL4CRe5kAEx3n_m-+mC6Lx_Gc3AbYsSBYZaQ at mail dot gmail dot com>
Ping http://sourceware.org/ml/gdb-patches/2013-04/msg00455.html
Thanks,
Hui
On Tue, Apr 16, 2013 at 5:32 PM, Hui Zhu <teawater@gmail.com> wrote:
> Hi Yao,
>
> Thanks for your review.
>
> On Thu, Apr 11, 2013 at 4:19 PM, Yao Qi <yao@codesourcery.com> wrote:
>> On 04/11/2013 03:40 PM, Hui Zhu wrote:
>>>
>>> --- a/testsuite/gdb.trace/tstatus.exp
>>> +++ b/testsuite/gdb.trace/tstatus.exp
>>> @@ -137,6 +137,8 @@ proc test_tracepoints {} {
>>>
>>> test_tracepoints
>>>
>>> +gdb_test_no_output "set default-collect \$regs"
>>> +
>>> set tracefile [standard_output_file ${testfile}]
>>> # Save trace frames to tfile.
>>> gdb_test "tsave ${tracefile}.tf" \
>>> @@ -147,6 +149,8 @@ gdb_test "tsave -ctf ${tracefile}.ctf" \
>>> "Trace data saved to directory '${tracefile}.ctf'.*" \
>>> "save ctf trace file"
>>>
>>> +gdb_test_no_output "set default-collect"
>>> +
>>> # Change target to tfile.
>>> set test "change to tfile target"
>>> gdb_test_multiple "target tfile ${tracefile}.tf" "$test" {
>>> @@ -159,6 +163,8 @@ gdb_test_multiple "target tfile ${tracef
>>> }
>>> }
>>>
>>> +gdb_test "show default-collect" "The list of expressions to collect by
>>> default is \"\\\$regs\".*"
>>> +
>>> # Convert "(because I can) to "\(because I can\)"
>>> set tstatus_output [string map {\( \\(} $tstatus_output]
>>> set tstatus_output [string map {\) \\)} $tstatus_output]
>>
>>
>> I am afraid that tstatus.exp is not a good place to test "default-collect".
>> The tstatus.exp is to test the output of command 'tstatus' in various
>> situations, and also test that the output of 'tstatus' command on tfile
>> target is identical to its output on the ctf target. Probably, actions.exp
>> is better, IMO.
>
> Move it to actions.exp
>
> Post a new version for it.
>
> Best,
> Hui
>
> 2013-04-16 Hui Zhu <hui@codesourcery.com>
>
> * gdb.trace/disconnected-tracing.exp (disconnected_tracing): Add
> test for default-collect.
> * gdb.trace/actions.exp: Add test for default-collect.
>
>>
>> --
>> Yao (éå)