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

On Wed, 2008-02-27 at 09:08 +0100, Lokesh Gupta wrote:
> 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'

This would definitely be one possible implementation.

By the way, the tracepoint framework was designed to be largely
implementation-independent, so that to a large extent it should 
be able to work with any of a number of different implementations.

What you suggest would have the advantage of being pretty 
general (should work with native/remote/sim/whatever), but
it has one big disadvantage -- as soon as gdb becomes involved
with the tracepoint data collection, you lose the advantage of
speed.

Part of the goal of tracepoints is to be as un-intrusive as
possible -- get in and get out without interfering with the
timing of the target system any more than necessary.  If
you're willing to compromise that goal, then you can do
things as you describe.

There's also no reason we can't have multiple tracepoint
implementations in place at the same time, so long as we
have a way of selecting between them.  Eg. turn off the
general-but-slow method if you have available a 
target-specific-but-fast method.





  reply	other threads:[~2008-02-27 18:33 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
2008-02-27 22:00     ` Michael Snyder [this message]
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=1204137220.19253.415.camel@localhost.localdomain \
    --to=msnyder@specifix.com \
    --cc=gdb@sourceware.org \
    --cc=lokesh.gupta@gmail.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