From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2530 invoked by alias); 2 Nov 2012 15:17:23 -0000 Received: (qmail 2502 invoked by uid 22791); 2 Nov 2012 15:17:21 -0000 X-SWARE-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Nov 2012 15:17:08 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA2FH59M022789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Nov 2012 11:17:05 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qA2FH3ah021461; Fri, 2 Nov 2012 11:17:05 -0400 Message-ID: <5093E3EF.6080903@redhat.com> Date: Fri, 02 Nov 2012 15:17:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix PR14617: New MI notification on tracepoint modified. References: <1350556586-12800-1-git-send-email-yao@codesourcery.com> In-Reply-To: <1350556586-12800-1-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2012-11/txt/msg00041.txt.bz2 On 10/18/2012 11:36 AM, Yao Qi wrote: > Hi, > As PR gdb/14617 described, when the passcount of a tracepoint is > modified, GDB doesn't emit any notification. This patch adds a > new notification '=tracepoint-modified' for the changes to > tracepoint-specific attributes. The reason I don't use > '=breakpoint-modified' notification is that IMO, it is about > changes to general breakpoints (breakpoint, tracepoint, catchpoint, > etc), so I don't want to put tracepoint-specific stuff into > it. For better or worse, we call everything "breakpoint". The number space of tracepoints is the same as of all other "breakpoint kinds". This didn't use to be the case. Tracepoints used to be a separate entity. They were merged back as a kind of breakpoint a couple years ago. It was seen as a step forward. We emit =breakpoint-created, =breakpoint-deleted for tracepoints: trace main &"trace main\n" ~"Note: breakpoint 6 also set at pc 0x457aab.\n" ~"Tracepoint 7 at 0x457aab: file ../../src/gdb/gdb.c, line 29.\n" =breakpoint-created,bkpt={number="7",type="tracepoint",disp="keep",enabled="y",addr="0x0000000000457aab",func="main",file="../../src/gdb/gdb.c",fullname="/home/pedro/gdb/mygit/src/gdb/gdb.c",line="29",times="0",original-location="main"} ^done (gdb) delete 7 &"delete 7\n" =breakpoint-deleted,id="7" ^done As also emit =breakpoint-modified for tracepoints, all other kinds of breakpoints (watchpoints, catchpoints, etc.). E.g., (gdb) condition 6 0 &"condition 6 0\n" =breakpoint-modified,bkpt={number="6",type="tracepoint",disp="keep",enabled="y",addr="0x0000000000457aab",func="main",file="../../src/gdb/gdb.c",fullname="/home/pedro/gdb/mygit/src/gdb/gdb.c",line="29",cond="0",times="0",original-location="main"} ^done This notification dumps the whole breakpoint, instead of trying to second guess what might be useful for the frontend. If you follow the tracepoint_modified observer introduction in breakpoint.c, you'll find that it was originally moved from tracepoint.c back into breakpoint.c, by Stan's patch that made tracepoints be a kind of breakpoint (23d4c598): 2009-03-30 Stan Shebs Make tracepoints into a type of breakpoint. ... It just seems like an oversight that this wasn't converted that well. For all of this, I'm against this new notification. Just make changing the tracepoint emit the existing =breakpoint-modified notification. Why doesn't that work? -- Pedro Alves