From: Jim Blandy <jimb@redhat.com>
To: Saravanan <pes@india.hp.com>
Cc: Eli Zaretskii <eliz@elta.co.il>, gdb@sources.redhat.com
Subject: Re: Tracepoint support in Cygnus GDB ?
Date: Wed, 24 Sep 2003 22:41:00 -0000 [thread overview]
Message-ID: <vt2he31olrj.fsf@zenia.home> (raw)
In-Reply-To: <6654-Wed24Sep2003201904+0300-eliz@elta.co.il>
"Eli Zaretskii" <eliz@elta.co.il> writes:
> > Date: Wed, 24 Sep 2003 16:09:49 +0530
> > From: Saravanan <pes@india.hp.com>
> >
> > 1. Why does GDB not provide this support for local
> > host ?
>
> Simple: because no one wrote tracepoints support for native
> debugging.
Right -- please contribute support for native tracepoints!
> > 2. Is it not the case that the features (supposed to
> > be) provided by tracepoints can be done using
> > breakpoint features only (for instance , we can
> > specify COMMANDS for a breakpoint just as we can
> > specify ACTIONS for tracepoints) ?
>
> Yes. But tracepoints are supposed to be much more lightweight
> (because only raw data is accumulated during the program's run, while
> complicated and expensive computations like evaluation of arbitrary
> expressions, are left for later). So, theoretically, if tracepoints
> were available for native debugging, one could perhaps debug programs
> without disrupting their time scale too much, maybe even debug
> real-time programs (well, one's allowed to dream once in a while,
> right? ;-).
Actually, the tracepoint system *does* evaluate arbitrary expressions
each time a tracepoint is hit. The expressions are compiled to a
bytecode which is pretty simple to interpret. Here's why it's
lightweight:
- The bytecode has had all the symbolic work squeezed out of it ---
it's just a bunch of pretty standard machine-level operations on
machine words. No name lookups, no type checking, etc. So it can
run in much less memory and much less time than GDB's evaluator.
- This means that it can be evaluated entirely on the target. No
communication with the host is needed. You can do a lot of
computation in the time it takes a byte to go across a serial line.
There are a bunch of ways we could support this on a native system:
- We could implement it as an extension to ordinary breakpoints:
hitting a tracepoint would stop the inferior; GDB would collect the
data, and then continue the inferior. I think this might not be so
lightweight.
- We could implement a tracing agent that would actually live in the
inferior and catch some sort of trap. This would be more complex,
but it would disturb the inferior less.
> > 3. Does tracepoint use the same TRAP (or ILLEGAL )
> > instruction mechanism for tracepoints as it does for
> > breakpoints?
>
> IIRC, yes.
Yep.
next prev parent reply other threads:[~2003-09-24 22:41 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-24 10:40 Saravanan
2003-09-24 18:12 ` Eli Zaretskii
2003-09-24 22:41 ` Jim Blandy [this message]
2003-09-25 4:02 ` Daniel Jacobowitz
2003-09-25 21:44 ` Andrew Cagney
2003-09-27 15:46 ` Eli Zaretskii
2003-09-27 17:49 ` Andrew Cagney
2003-09-27 18:37 ` Eli Zaretskii
2003-09-27 18:48 ` Andrew Cagney
2003-09-28 8:40 ` Eli Zaretskii
2003-09-28 19:44 ` Andrew Cagney
2003-09-28 21:07 ` Eli Zaretskii
2003-09-28 21:30 ` Daniel Jacobowitz
2003-09-29 5:36 ` Eli Zaretskii
2003-09-29 14:48 ` Daniel Jacobowitz
2003-09-28 22:25 ` Andrew Cagney
2003-09-29 5:41 ` Eli Zaretskii
2003-09-29 14:52 ` Andrew Cagney
2003-09-29 15:07 ` Daniel Jacobowitz
2003-10-01 21:49 ` Features vs infrastructure (was Re: Tracepoint support in Cygnus GDB ?) Stan Shebs
2003-10-02 3:29 ` Andrew Cagney
2003-10-02 3:47 ` Stan Shebs
2003-10-02 5:31 ` Andrew Cagney
2003-10-02 6:42 ` Stan Shebs
2003-10-02 7:02 ` Joel Brobecker
2003-10-02 19:18 ` Andrew Cagney
2003-10-02 6:04 ` Stan Shebs
2003-10-02 6:29 ` Andrew Cagney
2003-09-30 5:43 ` Tracepoint support in Cygnus GDB ? Jim Blandy
2003-09-30 21:14 ` Andrew Cagney
2003-09-28 22:50 Michael Elizabeth Chastain
2003-09-29 6:28 ` Eli Zaretskii
2003-09-29 13:21 Michael Elizabeth Chastain
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=vt2he31olrj.fsf@zenia.home \
--to=jimb@redhat.com \
--cc=eliz@elta.co.il \
--cc=gdb@sources.redhat.com \
--cc=pes@india.hp.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