From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19642 invoked by alias); 15 Jun 2012 18:32:02 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 19615 invoked by uid 22791); 15 Jun 2012 18:32:01 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org From: Tom Tromey To: Keith Seitz Cc: archer@sourceware.org Subject: Re: Explicit Linespecs Branch Created References: <4FD6548D.3050701@redhat.com> Date: Fri, 15 Jun 2012 18:32:00 -0000 In-Reply-To: <4FD6548D.3050701@redhat.com> (Keith Seitz's message of "Mon, 11 Jun 2012 13:26:53 -0700") Message-ID: <87haucs9yo.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2012-q2/txt/msg00001.txt.bz2 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