From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25138 invoked by alias); 27 Feb 2008 08:09:15 -0000 Received: (qmail 25123 invoked by uid 22791); 27 Feb 2008 08:09:14 -0000 X-Spam-Check-By: sourceware.org Received: from nf-out-0910.google.com (HELO nf-out-0910.google.com) (64.233.182.184) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 27 Feb 2008 08:08:57 +0000 Received: by nf-out-0910.google.com with SMTP id b11so1623260nfh.48 for ; Wed, 27 Feb 2008 00:08:54 -0800 (PST) Received: by 10.86.31.18 with SMTP id e18mr5694591fge.68.1204099734629; Wed, 27 Feb 2008 00:08:54 -0800 (PST) Received: by 10.86.78.13 with HTTP; Wed, 27 Feb 2008 00:08:54 -0800 (PST) Message-ID: <21b011a40802270008u4efb67av598dce53a828913f@mail.gmail.com> Date: Wed, 27 Feb 2008 12:55:00 -0000 From: "Lokesh Gupta" To: "Michael Snyder" Subject: Re: Tracepoints functionality for local targets Cc: gdb@sourceware.org In-Reply-To: <1204051129.19253.305.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <21b011a40802260027r596c2c0bt96339538b8e5cc92@mail.gmail.com> <1204051129.19253.305.camel@localhost.localdomain> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00230.txt.bz2 Hello, Can't we take the following approach to this issue: - Treat tracepoints as 'silent' breakpoints such that when the user sets tracepoints actually a breakpoint is inserted with a special property called as 'trace-silent' - During execution, when this breakpoint is hit, the usual GDB flow of handling the breakpoint comes into picture, GDB gets control, it collects all required data from the current frame ($regs,$args,$locals as requested by user for this tracepoint), and then silently continues the execution because it can identify it as a special breakpoint with the property of 'trace-silent' - The data which is collected by an enabled tracepoint is stored as a 'snapshot' which is a node in a linked list of all snapshots collected during program execution. This linked list could be used for the implementation of the tfind like functions to provide necessary information to the user. Regards Lokesh Gupta On Tue, Feb 26, 2008 at 7:38 PM, Michael Snyder wrote: > > On Tue, 2008-02-26 at 09:27 +0100, Lokesh Gupta wrote: > > Hello, > > > > Is there some work planned for the working of the tracepoints for > > local targets? While going through the source code, I realized that > > currently this facility is only for remote targets. > > In case nothing is planned, can I have some guidance on how to achieve > > this. I think that it could be a good enhancement to debug > > multi-threaded programs on the local host. > > You could define it as two challenges to be addressed: > 1) How to instrument the code and collect the data on a > native system, and > 2) the fact that the gdb side is only written to handle > the remote target. > > I would certainly love to see a native implementation > happen, and it would be fair to say that #2 is my fault, > so if somebody were to seriously undertake solving #1, > I would undertake to at least help work on #2... > > Michael > > >