From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12729 invoked by alias); 29 Jun 2009 16:38:54 -0000 Received: (qmail 12720 invoked by uid 22791); 29 Jun 2009 16:38:53 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Jun 2009 16:38:42 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5TGaeS5009147; Mon, 29 Jun 2009 12:36:40 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5TGade3001926; Mon, 29 Jun 2009 12:36:40 -0400 Received: from opsy.redhat.com (vpn-225-41.phx2.redhat.com [10.3.225.41]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5TGad3D004778; Mon, 29 Jun 2009 12:36:39 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 6BBEA3784C5; Mon, 29 Jun 2009 10:36:38 -0600 (MDT) To: Stan Shebs Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Conditional tracepoints References: <4A45AE9B.9020400@codesourcery.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Mon, 29 Jun 2009 16:38:00 -0000 In-Reply-To: <4A45AE9B.9020400@codesourcery.com> (Stan Shebs's message of "Fri\, 26 Jun 2009 22\:31\:07 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-06/txt/msg00823.txt.bz2 >>>>> "Stan" == Stan Shebs writes: Stan> This patch adds conditional tracepoints. Tracepoint conditions work Stan> by being compiled into agent expressions that actually evaluate on the Stan> spot in the target, rather than collecting blocks of trace data. Very cool. Now I'm wondering if we could use agent expressions for conditional breakpoints somehow :-) Stan> As usual for tracepoints, GDB proper doesn't have to do much, Stan> and most of the code here revolves around checking for the Stan> "ConditionalTracepoints" feature, so as to maintain Stan> compatibility with the two(?) existing tracepoint Stan> implementations out there. Are either of these free software? Stan> + Stan> + struct agent_expr * Stan> + gen_eval_for_expr (CORE_ADDR scope, struct expression *expr) Could use a header comment. Stan> Index: tracepoint.c [...] Stan> + extern int remote_supports_cond_tracepoints (void); This seems fishy to me. At the very least I think this should be in a header, not in the .c file. But... other cases like this seem to be expressed via target methods, not as direct calls into remote.c. (I thought maybe remote.o was not always compiled in; there are comments to that effect, but they appear to be stale.) Tom