From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13284 invoked by alias); 1 Apr 2013 04:52:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 13192 invoked by uid 89); 1 Apr 2013 04:52:40 -0000 X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE autolearn=ham version=3.3.1 Received: from mail-oa0-f50.google.com (HELO mail-oa0-f50.google.com) (209.85.219.50) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 01 Apr 2013 04:52:37 +0000 Received: by mail-oa0-f50.google.com with SMTP id n1so1667660oag.23 for ; Sun, 31 Mar 2013 21:52:36 -0700 (PDT) X-Received: by 10.60.101.232 with SMTP id fj8mr3635694oeb.28.1364791956336; Sun, 31 Mar 2013 21:52:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.13.133 with HTTP; Sun, 31 Mar 2013 21:51:56 -0700 (PDT) In-Reply-To: <514EE46A.4070808@mentor.com> References: <514EE46A.4070808@mentor.com> From: Hui Zhu Date: Mon, 01 Apr 2013 04:52:00 -0000 Message-ID: Subject: Re: [PATCH] Reset tracepoint step_count to 0 before set it action To: Hui Zhu Cc: gdb-patches ml , Stan Shebs , Joel Brobecker Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-04/txt/msg00002.txt.bz2 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 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 > > * 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 > > * gdb.trace/Makefile.in (PROGS): Add actions-changed. > * gdb.trace/actions-changed.c: New. > * gdb.trace/actions-changed.exp: New.