From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87033 invoked by alias); 11 Aug 2015 21:50:54 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 87024 invoked by uid 89); 11 Aug 2015 21:50:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f41.google.com Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 11 Aug 2015 21:50:52 +0000 Received: by pacgr6 with SMTP id gr6so59111623pac.2 for ; Tue, 11 Aug 2015 14:50:50 -0700 (PDT) X-Received: by 10.68.190.234 with SMTP id gt10mr60434410pbc.153.1439329850813; Tue, 11 Aug 2015 14:50:50 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by smtp.gmail.com with ESMTPSA id ob4sm3844959pbb.40.2015.08.11.14.50.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Aug 2015 14:50:50 -0700 (PDT) From: Doug Evans To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v6 7/9] Explicit locations: add UI features for CLI References: <1439325928-4723-1-git-send-email-keiths@redhat.com> Date: Tue, 11 Aug 2015 21:50:00 -0000 In-Reply-To: <1439325928-4723-1-git-send-email-keiths@redhat.com> (Keith Seitz's message of "Tue, 11 Aug 2015 13:45:28 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00256.txt.bz2 Keith Seitz writes: > Doug Evans writes: >> Keith Seitz writes: >> >>> + else >>> + { >>> + /* Handle numbers first, stopping at the next whitespace or ','. */ >>> + while (isdigit (*inp[0])) >>> + ++(*inp); >>> + if (*inp[0] == '\0' || isspace (*inp[0]) || *inp[0] == ',') >>> + return savestring (start, *inp - start); >>> + >>> + /* Otherwise stop at the next occurrence of "SPACE -", '\0', >>> + keyword, or ','. */ >> >>> This comment needs updating (right?). > > Yes, indeed! As you've identified, the code now stops at any whitespace > instead of "SPACE -". Fixsd. > >> I have checked in the temp fix for 17960 so the "if {0}" can be removed. > > Excellent. I have rebased and verified that all tests pass (and they do!). > > For the record, this is the final version I plan on committing/pushing. > > gdb/ChangeLog: > > * completer.c: Include location.h. > (enum match_type): New enum. > (location_completer): Rename to ... > (linespec_completer): ... this. > (collect_explicit_location_matches, backup_text_ptr) > (explicit_location_completer): New functions. > (location_completer): "New" function; handle linespec > and explicit location completions. > (complete_line_internal): Remove all location completer-specific > handling. > * linespec.c (linespec_lexer_lex_keyword, is_ada_operator) > (find_toplevel_char): Export. > (linespec_parse_line_offset): Export. > Issue error if STRING is not numerical. > (gdb_get_linespec_parser_quote_characters): New function. > * linespec.h (linespec_parse_line_offset): Declare. > (get_gdb_linespec_parser_quote_characters): Declare. > (is_ada_operator): Declare. > (find_toplevel_char): Declare. > (linespec_lexer_lex_keyword): Declare. > * location.c (explicit_to_event_location): New function. > (explicit_location_lex_one): New function. > (string_to_explicit_location): New function. > (string_to_event_location): Handle explicit locations. > * location.h (explicit_to_event_location): Declare. > (string_to_explicit_location): Declare. > > gdb/testsuite/ChangeLog: > > * gdb.linespec/3explicit.c: New file. > * gdb.linespec/cpexplicit.cc: New file. > * gdb.linespec/cpexplicit.exp: New file. > * gdb.linespec/explicit.c: New file. > * gdb.linespec/explicit.exp: New file. > * gdb.linespec/explicit2.c: New file. > * gdb.linespec/ls-errs.exp: Add explicit location tests. > * lib/gdb.exp (capture_command_output): Regexp-escape `command' > before using in the matching pattern. > Clarify that `prefix' is a regular expression. LGTM