From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 607 invoked by alias); 10 Aug 2015 17:34:35 -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 576 invoked by uid 89); 10 Aug 2015 17:34:34 -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-pd0-f172.google.com Received: from mail-pd0-f172.google.com (HELO mail-pd0-f172.google.com) (209.85.192.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 10 Aug 2015 17:34:33 +0000 Received: by pdrh1 with SMTP id h1so55712318pdr.0 for ; Mon, 10 Aug 2015 10:34:31 -0700 (PDT) X-Received: by 10.70.43.79 with SMTP id u15mr36964478pdl.84.1439228071727; Mon, 10 Aug 2015 10:34:31 -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 pi4sm2061614pdb.60.2015.08.10.10.34.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 10:34:31 -0700 (PDT) From: Doug Evans To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v6 2/9] Explicit locations: introduce new struct event_location-based API References: <20150805232802.21646.88440.stgit@valrhona.uglyboxes.com> <20150805232913.21646.96976.stgit@valrhona.uglyboxes.com> Date: Mon, 10 Aug 2015 17:34:00 -0000 In-Reply-To: <20150805232913.21646.96976.stgit@valrhona.uglyboxes.com> (Keith Seitz's message of "Wed, 05 Aug 2015 16:29:31 -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/msg00219.txt.bz2 Keith Seitz writes: > Differences in this revision: > > 1. Fixed typos > 2. Changed error-handling in linespec_lex_to_end. > 3. Remove unused references to copy_event_location_tmp. > > -- > > This patch introduces the new breakpoint/"linespec" API based on > a new struct event_location. This API currently only supports > traditional linespecs, maintaining the status quo of the code base. > Future patches will add additional functionality for other location > types such as address locations. > > gdb/ChangeLog: > > * Makefile.in (SFILES): Add location.c. > (HFILES_NO_SRCDIR): Add location.h. > (COMMON_OBS): Add location.o. > * linespec.c (linespec_lex_to_end): New function. > * linespec.h (linespec_lex_to_end): Declare. > * location.c: New file. > * location.h: New file. Hi. I'm going to try to minimize the number of requested changes. I'd really like to get this checked in, and I'm sure you would too. :-) This patch is ok as is, though there is one change I would make. This change *can* be deferred for later, but feel free to make it now. The requested change is: Remove event_location_to_string_const from location.h and make it static in location.c. I didn't check any intermediate state of applying the patch series, but after I apply all the patches event_location_to_string_const is only used in location.c. Later (not now, let's get this sucker checked in, unless of course you really want to), let's make event_location_to_string take a const struct event_location *, and make the cached copy "mutable in the c++ sense".