This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Reset tracepoint step_count to 0 before set it action


Ping.
http://old.nabble.com/-PATCH--Reset-tracepoint-step_count-to-0-before-set-it-action-p35211711.html

Wish this bug fix get review before new release.

Thanks,
Hui

On Sun, Mar 24, 2013 at 7:32 PM, Hui Zhu <hui_zhu@mentor.com> wrote:
> Hi,
>
> If a tracepoint's action include a while-stepping, when it set to actions
> without while-stepping.  The step_count will keep to its old value.  For
> example:
> (gdb) trace subr
> Tracepoint 1 at 0x4004d9: file
> ../../../src/gdb/testsuite//actions-changed.c, line 31.
> (gdb) actions
> Enter actions for tracepoint 1, one per line.
> End with a line saying just "end".
>>
>> collect $reg
>> end
>
> (gdb) set debug remote 1
> (gdb) tstart
> Sending packet: $QTinit#59...Packet received: OK
> Sending packet: $QTDP:1:00000000004004d9:E:0:0-#a3...Packet received: OK
> Sending packet: $QTDP:-1:00000000004004d9:R03FFFFFFFFFFFFFFFFFF#2b...Packet
> received: OK
> (gdb) tstop
> Sending packet: $QTStop#4b...Packet received: OK
> Sending packet: $QTNotes:#e8...Packet received: OK
> (gdb) actions
> Enter actions for tracepoint 1, one per line.
> End with a line saying just "end".
>>
>> collect $reg
>> while-stepping 1
>
>  >collect $reg
>  >end
>>
>> end
>
> (gdb) tstart
> Sending packet: $QTinit#59...Packet received: OK
> Sending packet: $QTDP:1:00000000004004d9:E:1:0-#a4...Packet received: OK
> Sending packet: $QTDP:-1:00000000004004d9:R03FFFFFFFFFFFFFFFFFF-#58...Packet
> received: OK
> Sending packet: $QTDP:-1:00000000004004d9:SR03FFFFFFFFFFFFFFFFFF#7e...Packet
> received: OK
> (gdb) tstop
> Sending packet: $QTStop#4b...Packet received: OK
> Sending packet: $QTNotes:#e8...Packet received: OK
> (gdb) actions
> Enter actions for tracepoint 1, one per line.
> End with a line saying just "end".
>>
>> collect $regs
>> end
>
> (gdb) tstart
> Sending packet: $QTinit#59...Packet received: OK
> Sending packet: $QTDP:1:00000000004004d9:E:1:0-#a4...Packet received: OK
> Sending packet: $QTDP:-1:00000000004004d9:R03FFFFFFFFFFFFFFFFFF#2b...Packet
> received: OK
>
> The last "$QTDP:1:00000000004004d9:E:1:0-#a4" should be
> "$QTDP:1:00000000004004d9:E:0:0-#a3".
>
> Post a patch to fix it and there also a test for this issue.
>
> Please help me review it.  And I suggest this change can be checked to 7.6
> branch.
>
> Thanks,
> Hui
>
> 2013-03-24  Hui Zhu  <hui@codesourcery.com>
>
>         * breakpoint.c (do_map_commands_command): Reset step_count to 0
>         if this is a tracepoint.
>         * tracepoint.c (trace_actions_command): Ditto.
>
> 2013-03-24  Stan Shebs  <stan@codesourcery.com>
>
>         * gdb.trace/Makefile.in (PROGS): Add actions-changed.
>         * gdb.trace/actions-changed.c: New.
>         * gdb.trace/actions-changed.exp: New.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]