This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v6 2/9] Explicit locations: introduce new struct event_location-based API
- From: Doug Evans <xdje42 at gmail dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 10 Aug 2015 10:33:36 -0700
- Subject: Re: [PATCH v6 2/9] Explicit locations: introduce new struct event_location-based API
- Authentication-results: sourceware.org; auth=none
- References: <20150805232802 dot 21646 dot 88440 dot stgit at valrhona dot uglyboxes dot com> <20150805232913 dot 21646 dot 96976 dot stgit at valrhona dot uglyboxes dot com>
Keith Seitz <keiths@redhat.com> 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".