binutils-gdb/gdb/python
Pedro Alves 40d97ee21f Eliminate the two-level data structures behind location_specs
Currently, there's the location_spec hierarchy, and then some
location_spec subclasses have their own struct type holding all their
data fields.

I.e., there is this:

 location_spec
   explicit_location_spec
   linespec_location_spec
   address_location_spec
   probe_location_spec

and then these separate types:

  explicit_location
  linespec_location

where:

  explicit_location_spec
     has-a explicit_location
  linespec_location_spec
     has-a linespec_location

This patch eliminates explicit_location and linespec_location,
inlining their members in the corresponding location_spec type.

The location_spec subclasses were the ones currently defined in
location.c, so they are moved to the header.  Since the definitions of
the classes are now visible, we no longer need location_spec_deleter.

Some constructors that are used for cloning location_specs, like:

  explicit explicit_location_spec (const struct explicit_location *loc)

... were converted to proper copy ctors.

In the process, initialize_explicit_location is eliminated, and some
functions that returned the "data type behind a locspec", like
get_linespec_location are converted to downcast functions, like
as_linespec_location_spec.

Change-Id: Ia31ccef9382b25a52b00fa878c8df9b8cf2a6c5a
2022-06-17 09:55:39 +01:00
..
lib/gdb gdb/python: implement the print_insn extension language hook 2022-06-15 09:44:54 +01:00
py-all-events.def Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-arch.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-auto-load.c Unify gdb printf functions 2022-03-29 12:46:24 -06:00
py-block.c gdb: remove BLOCK_SUPERBLOCK macro 2022-04-27 22:05:03 -04:00
py-bpevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-breakpoint.c Eliminate the two-level data structures behind location_specs 2022-06-17 09:55:39 +01:00
py-cmd.c gdb/python: improve formatting of help text for user defined commands 2022-05-28 10:36:50 +01:00
py-connection.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-continueevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-disasm.c gdb/python: implement the print_insn extension language hook 2022-06-15 09:44:54 +01:00
py-event-types.def Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-event.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-event.h Remove "typedef enum ..." 2022-04-28 09:31:15 -06:00
py-events.h Use bool for evregpy_no_listeners_p 2022-06-03 10:35:30 -06:00
py-evtregistry.c Use bool for evregpy_no_listeners_p 2022-06-03 10:35:30 -06:00
py-evts.c gdb/python: remove Python 2 support 2022-03-23 07:41:19 -04:00
py-exitedevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-finishbreakpoint.c event_location -> location_spec 2022-06-17 09:41:24 +01:00
py-frame.c Add gdb.current_language and gdb.Frame.language 2022-06-01 06:15:53 -06:00
py-framefilter.c Unify gdb printf functions 2022-03-29 12:46:24 -06:00
py-function.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-gdb-readline.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-inferior.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-infevents.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-infthread.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-instruction.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-instruction.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-lazy-string.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-linetable.c gdb: remove SYMTAB_LINETABLE macro, add getter/setter 2022-02-06 15:48:19 -05:00
py-membuf.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-micmd.c Unify gdb printf functions 2022-03-29 12:46:24 -06:00
py-newobjfileevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-objfile.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-param.c gdb/python: improve formatting of help text for user defined commands 2022-05-28 10:36:50 +01:00
py-prettyprint.c ODR warning for "enum string_repr_result" 2022-06-02 09:04:45 -06:00
py-progspace.c Constify solib_name_from_address 2022-06-07 07:21:26 -06:00
py-record-btrace.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-record-btrace.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-record-full.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-record-full.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-record.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-record.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-ref.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-registers.c gdb: move struct reggroup into reggroups.h header 2022-04-07 16:01:18 +01:00
py-signalevent.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-stopevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-stopevent.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-symbol.c gdb: remove BLOCKVECTOR_BLOCK and BLOCKVECTOR_NBLOCKS macros 2022-04-27 22:05:03 -04:00
py-symtab.c gdb: remove BLOCKVECTOR_BLOCK and BLOCKVECTOR_NBLOCKS macros 2022-04-27 22:05:03 -04:00
py-threadevent.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-tui.c Change how Python architecture and language are handled 2022-01-26 06:49:51 -07:00
py-type.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
py-unwind.c Unify gdb printf functions 2022-03-29 12:46:24 -06:00
py-utils.c gdb/python: convert gdbpy_err_fetch to use gdbpy_ref 2022-06-15 09:44:54 +01:00
py-value.c Remove obsolete Python 2 comment 2022-06-05 10:11:37 -06:00
py-varobj.c Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00
py-xmethods.c gdb/python: remove Python 2/3 compatibility macros 2022-03-23 07:42:57 -04:00
python-config.py gdb: re-format Python files using black 21.4b0 2021-05-07 10:56:20 -04:00
python-internal.h gdb/python: implement the print_insn extension language hook 2022-06-15 09:44:54 +01:00
python.c event_location -> location_spec 2022-06-17 09:41:24 +01:00
python.h Automatic Copyright Year update after running gdb/copyright.py 2022-01-01 19:13:23 +04:00