public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: archer@sourceware.org
Subject: Re: Explicit Linespecs Branch Created
Date: Fri, 15 Jun 2012 18:32:00 -0000	[thread overview]
Message-ID: <87haucs9yo.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4FD6548D.3050701@redhat.com> (Keith Seitz's message of "Mon, 11 Jun 2012 13:26:53 -0700")

Keith> Since this patchset is so large and invasive, I have checked it into
Keith> the Archer repository for "pre-review." It's in the
Keith> archer-keiths-explicit-linespecs branch.

I started looking at it, but really I think you should either do the
final polishing (docs and ChangeLog) and submit it; or send an RFC to
the gdb@ list.  The problem with posting here is that, even if we all
agree about everything, it'll still have to go through another round of
kibitzing when you submit it, and so you might as well skip the middle
man.

Keith> + MI: -break-insert -c 'foo == bar' -t -e -s source.c -f function -l 
Keith> label -o offset

Keith> Currently, the explicit linespec flag (-e) must be the last option in
Keith> the command. Everything after "-e" is restricted to explicit
Keith> linespecs. [This restriction was enabled so that we don't have to
Keith> require some really ugly quoting, e.g., -break-insert -e "-f main
Keith> -offset 3" -c "foo == bar".

I don't understand why MI needs a -e option at all.

You can either have the explicit bits parsed directly, by adding options
to 'opts' in mi_cmd_break_insert; or you can just add a new
-break-insert-explicit command.

Keith> + CLI: break -source source.c -function function -label label -offset
Keith> offset -condition "foo == bar" -thread 1
[...]
Keith> When setting an explicit linespec, users may not use the keywords
Keith> "if", "thread", or "task". If using explicit linespecs, *everything*
Keith> must be explicitly specified.

I think quoting any expression here is going to be a pain, but I'm
curious to hear what others think.

What is the reason for this approach?

How does this interact with systemtap probe point specifications?

How hard is it to add support for this to other linespec-using commands?
Also I wonder what the best way to expose this to Python might be; for
example if one wanted to write a Python command that accepted any sort
of linespec.

Keith>   + I have introduced several new error messages. They should be
Keith> double-checked:
Keith>     o "invalid linespec argument, \"%s\"" : This is output when the
Keith> user attempts to use an invalid explicit linespec flag, e.g.,
Keith> "-foobar".
Keith>     o "missing argument for \"%s\" : This is output when the user
Keith> omits an argument for a given explicit linespec flag.

Looks good to me.

Tom

  reply	other threads:[~2012-06-15 18:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 20:27 Keith Seitz
2012-06-15 18:32 ` Tom Tromey [this message]
2012-06-21 19:09   ` Keith Seitz
2012-06-21 20:38     ` Tom Tromey
2012-06-29 13:31       ` 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=87haucs9yo.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=archer@sourceware.org \
    --cc=keiths@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).