event_location -> location_spec
authorPedro Alves <pedro@palves.net>
Mon, 23 May 2022 19:15:18 +0000 (20:15 +0100)
committerPedro Alves <pedro@palves.net>
Fri, 17 Jun 2022 08:41:24 +0000 (09:41 +0100)
commit264f98902f27497f7494933628b0f5c4e117fe59
tree7a56e489f4441c3132a4d2b0b636a64ace58cd7c
parent14e283ff4e0656327179a5b69954796af3807b66
event_location -> location_spec

Currently, GDB internally uses the term "location" for both the
location specification the user input (linespec, explicit location, or
an address location), and for actual resolved locations, like the
breakpoint locations, or the result of decoding a location spec to
SaLs.  This is expecially confusing in the breakpoints module, as
struct breakpoint has these two fields:

  breakpoint::location;
  breakpoint::loc;

"location" is the location spec, and "loc" is the resolved locations.

And then, we have a method called "locations()", which returns the
resolved locations as range...

The location spec type is presently called event_location:

  /* Location we used to set the breakpoint.  */
  event_location_up location;

and it is described like this:

  /* The base class for all an event locations used to set a stop event
     in the inferior.  */

  struct event_location
  {

and even that is incorrect...  Location specs are used for finding
actual locations in the program in scenarios that have nothing to do
with stop events.  E.g., "list" works with location specs.

To clean all this confusion up, this patch renames "event_location" to
"location_spec" throughout, and then all the variables that hold a
location spec, they are renamed to include "spec" in their name, like
e.g., "location" -> "locspec".  Similarly, functions that work with
location specs, and currently have just "location" in their name are
renamed to include "spec" in their name too.

Change-Id: I5814124798aa2b2003e79496e78f95c74e5eddca
21 files changed:
gdb/ada-lang.c
gdb/ax-gdb.c
gdb/break-catch-throw.c
gdb/breakpoint.c
gdb/breakpoint.h
gdb/cli/cli-cmds.c
gdb/completer.c
gdb/elfread.c
gdb/guile/scm-breakpoint.c
gdb/linespec.c
gdb/linespec.h
gdb/location.c
gdb/location.h
gdb/mi/mi-cmd-break.c
gdb/probe.c
gdb/probe.h
gdb/python/py-breakpoint.c
gdb/python/py-finishbreakpoint.c
gdb/python/python.c
gdb/remote.c
gdb/tracepoint.c