public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: Project Archer <archer@sourceware.org>
Subject: Re: systemtap markers and gdb
Date: Fri, 04 Feb 2011 22:00:00 -0000	[thread overview]
Message-ID: <m3hbcj7956.fsf@fleche.redhat.com> (raw)
In-Reply-To: <m3bp3kg0vi.fsf@fleche.redhat.com> (Tom Tromey's message of "Thu, 13 Jan 2011 10:38:25 -0700")

Tom> Also, FWIW, we weren't planning to integrate this with the existing GDB
Tom> marker support.  That code only works for tracepoints and requires the
Tom> inferior to use UST.  I think we could do this integration, but my
Tom> impression is that right now we don't have many users using tracepoints
Tom> -- whereas we have some immediate uses for these catchpoints.

We were discussing this again on irc yesterday, and Roland had an
intriguing idea about how to handle marker arguments.

The main motivation for implementing marker support using a catchpoint
rather than a breakpoint with a new kind of linespec was that we want to
expose the marker arguments to scripts, but we didn't want to make this
dependent on the kind of linespec in use.

Roland's idea is to make this PC-based -- make the marker arguments
available at a marked PC, regardless of how one ended up at that PC.

So, I think we should change our plans back.  This means rewriting the
UI code on the branch, which I will do.

Using linespecs has a few nice features.  First, it doesn't require any
more Python API, it will all just work.  Ditto for the internal places
where we want to use stap markers (exceptions, longjmp).  Also, it seems
very easy to make marker arguments work with tracepoints.


I also looked at the exist UST-based static tracepoint markers, to see
if we could or should share anything.

From what I can tell, the UST work defines two additional commands: the
static tracepoint command ("strace" -- sigh) and "info
static-tracepoint-markers".

We won't need "strace", since our approach is more general.

"info static-tracepoint-markers" is like our "info markers", but it
includes some columns that are not relevant, and it doesn't seem to have
the notion that a given marker may resolve to more than one address.
So, while maybe we could use the same command, but I think in the first
patch we will not.  It isn't a perfect fit and its name makes it
tracepoint-specific besides.


I didn't rewrite the docs yet, but here is the new proposal.

First, a new linespec that looks like `marker:[OBJFILE]:PROVIDER:NAME'.
E.g.:  (gdb) break marker:glibc:pthread_create

I'll try to make this a bit generic so we could stick in new kinds of
linespec prefixes later.

Second, a bunch of convenience variables, $marker_argc, $marker_arg0
.. $marker_arg9.  These will always be visible, but will throw
exceptions unless the current PC is a marker PC.  These will include a
method to compile the reference to the AX bytecode.

Third, a new "info markers" command, as in the earlier proposal.


Let me know what you think.

Tom

  reply	other threads:[~2011-02-04 22:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 15:39 Tom Tromey
2011-01-13 15:53 ` Phil Muldoon
2011-01-13 16:06   ` Tom Tromey
2011-01-13 17:15     ` Roland McGrath
2011-01-13 17:38       ` Tom Tromey
2011-02-04 22:00         ` Tom Tromey [this message]
2011-02-04 23:45           ` Roland McGrath
2011-02-07 15:22             ` Tom Tromey
2011-02-07 18:41               ` Roland McGrath
2011-02-07 16:55           ` Tom Tromey

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=m3hbcj7956.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    --cc=roland@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).