Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Lokesh Gupta" <lokesh.gupta@gmail.com>
To: "Michael Snyder" <msnyder@specifix.com>
Cc: gdb@sourceware.org
Subject: Re: Tracepoints functionality for local targets
Date: Wed, 27 Feb 2008 12:55:00 -0000	[thread overview]
Message-ID: <21b011a40802270008u4efb67av598dce53a828913f@mail.gmail.com> (raw)
In-Reply-To: <1204051129.19253.305.camel@localhost.localdomain>

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 <msnyder@specifix.com> 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
>
>
>


  reply	other threads:[~2008-02-27  8:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 10:03 Lokesh Gupta
2008-02-26 18:11 ` Daniel Jacobowitz
2008-02-26 18:39   ` Doug Evans
2008-03-01 19:29     ` Nicholas Mc Guire
2008-03-01 19:43       ` Doug Evans
2008-03-02  8:50         ` Nicholas Mc Guire
2008-03-02 11:37           ` Robert Dewar
2008-03-02 13:37             ` Nicholas Mc Guire
2008-03-02 14:00               ` Robert Dewar
2008-03-03 10:09               ` Richard Stallman
2008-03-03 19:54                 ` Eli Zaretskii
2008-03-04 19:42                   ` Richard Stallman
2008-02-27  1:06 ` Michael Snyder
2008-02-27 12:55   ` Lokesh Gupta [this message]
2008-02-27 22:00     ` Michael Snyder
2008-03-01 19:36     ` Nicholas Mc Guire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21b011a40802270008u4efb67av598dce53a828913f@mail.gmail.com \
    --to=lokesh.gupta@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=msnyder@specifix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox