From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17912 invoked by alias); 5 Jan 2010 22:43:42 -0000 Received: (qmail 17903 invoked by uid 22791); 5 Jan 2010 22:43:41 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_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; Tue, 05 Jan 2010 22:43:38 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o05MhUgm022016 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 5 Jan 2010 17:43:30 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o05MhUSg009310; Tue, 5 Jan 2010 17:43:30 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o05MhS0G029276; Tue, 5 Jan 2010 17:43:29 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 7D4C837828E; Tue, 5 Jan 2010 15:43:28 -0700 (MST) From: Tom Tromey To: Stan Shebs Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fast tracepoints References: <4B42A628.5060302@codesourcery.com> Reply-To: tromey@redhat.com Date: Tue, 05 Jan 2010 22:43:00 -0000 In-Reply-To: <4B42A628.5060302@codesourcery.com> (Stan Shebs's message of "Mon, 04 Jan 2010 18:38:32 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (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: 2010-01/txt/msg00090.txt.bz2 >>>>> "Stan" == Stan Shebs writes: Stan> This patch adds "fast" tracepoints to GDB. Neat. Stan> Most of the interesting trickery is on the target side - but don't Stan> despair, Pedro has upcoming patches for a free version using gdbserver Stan> and a special library. I wonder whether this could somehow work with systemtap probe points. Stan> + static void Stan> + check_fast_tracepoint_sals (struct symtabs_and_lines *sals) [...] Stan> + if (!gdbarch_fast_tracepoint_valid_at (get_current_arch (), Stan> + sal->pc, NULL)) Stan> + error (_("May not have a fast tracepoint at 0x%s"), Stan> + paddress (get_current_arch (), sal->pc)); Stan> + static int Stan> + i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch, Stan> + CORE_ADDR addr, int *isize) [...] Stan> + printf_filtered (_("Instruction at 0x%s is only %d bytes long, need at least %d bytes for the fast tracepoint jump\n"), Stan> + paddress (gdbarch, addr), len, jumplen); It seems like it would be nicer for the user if the _at method returned a reason, so that it could be printed as "May not have a fast tracepoint: ... : reason". Similarly, it seems a little strange to me that a predicate function is expected to print a warning. Tom