From: Alexandre Courbot <Alexandre.Courbot@lifl.fr>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: Using gdb as a trace agent
Date: Mon, 17 May 2004 22:17:00 -0000 [thread overview]
Message-ID: <40A93A90.7070904@lifl.fr> (raw)
In-Reply-To: <vt2ad06ap24.fsf@zenia.home>
> Yep. Here's why it's only been implemented remotely:
Is it possible to use tracepoints remotely as of today? I mean, the code
seems to be here in GDB, but is there a target that supports them?
Say I have 2 computers running GNU/Linux and a network connection
between them. Can I then use tracepoints to analyze my program as of today?
> So for native configurations, the challenge is to find a low-overhead
> way to handle those traps. For example, one could add tracepoint
> support to gdbserver, but then you'd have one process collecting data
> from another process via ptrace or some other system call, and it
> wouldn't be very lightweight.
If gdbserver is running on a different host than gdb, then I guess the
overhead would be comparable to any other system, right? (just a
question, I'm just a regular gdb user for now). So maybe the first thing
to do would be to add tracepoint support to gdbserver, since you seem to
say it's missing.
On a completely local configuration, the problem is different indeed.
Maybe if you can evaluate the amount of data to be collected, you can
reserve a large enough area of memory that would receive all the traced
datas, without any expression evaluation during collection. Evaluation
would occur during data examination, so the program gets disturbed as
less as possible while running. Problem: make sure memory doesn't blow
up and avoid allocations while debugging. These two reasons are probably
what makes tracepoints implementation easier on a distributed architecture.
Well, these are just random ideas. As I said, I don't have a clear idea
yet of gdb's internals.
I'm very interested in that anyway. We need here to be able to evaluate
our OSes in an easy, non-intrusive and efficient way. GDB has proven it
was great even for non-debugging purposes (for instance, introspecting a
program and get some datas out of it to be exploited by gnuplot), with
tracepoints it would be just *fine*. Oh, and file IOs to write the
collected datas into files without debuggee and GDB output with them. ;)
Just saw that there has been some discussion about this subject recently:
http://sources.redhat.com/ml/gdb/2004-01/msg00012.html
Seems the ideas were nearly the same. Did it give some results (i.e. code)?
Alex.
--
Alexandre Courbot - PhD student
RD2P/LIFL
http://www.lifl.fr/~courbot
next prev parent reply other threads:[~2004-05-17 22:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-17 13:00 Alexandre Courbot
2004-05-17 15:36 ` Jim Blandy
2004-05-17 16:49 ` Alexandre Courbot
2004-05-17 18:09 ` Eli Zaretskii
2004-05-17 18:29 ` Jim Blandy
2004-05-17 22:17 ` Alexandre Courbot [this message]
2004-05-18 7:07 ` Ramana Radhakrishnan
2004-05-18 8:33 ` Alexandre Courbot
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=40A93A90.7070904@lifl.fr \
--to=alexandre.courbot@lifl.fr \
--cc=gdb@sources.redhat.com \
--cc=jimb@redhat.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