This is the mail archive of the
mailing list for the Archer project.
Re: Explicit Linespecs Branch Created
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: archer at sourceware dot org
- Date: Fri, 15 Jun 2012 12:31:43 -0600
- Subject: Re: Explicit Linespecs Branch Created
- References: <4FD6548D.firstname.lastname@example.org>
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
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
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
Keith> + I have introduced several new error messages. They should be
Keith> o "invalid linespec argument, \"%s\"" : This is output when the
Keith> user attempts to use an invalid explicit linespec flag, e.g.,
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.