[v3,0/2] Adding ability to disable GDB compile

Message ID 20250325124249.4023627-1-guinevere@redhat.com
Headers
Series Adding ability to disable GDB compile |

Message

Guinevere Larsen March 25, 2025, 12:42 p.m. UTC
  This patch series is yet another one allowing a user to select
components at configure time, this one about the compile subsystem.

The reason I'm wanting to disable configure is that if the patch for
disabling debuginfo formats were to patch, there is no way to support
compile. Compile calls about as many functions from the dwarf2
subsystem as the rest of GDB, and it is the only way to handle those
compiled snippets at present, so if no dwarf reading capabilities are
present, compile can't function.

This whole series can be seen as preparatory work for my next version of
this patch series[1]. The first patch is itself preparatory for the
second one, where the actual change happens.

[1] https://inbox.sourceware.org/gdb-patches/20241217174122.482708-1-guinevere@redhat.com/

Eli has already approved the documentation for the series, and the first
patch is already approved by tromey, I just need an approval for the
second patch.

Changelog for v3:
* Fixed handling of cli-scripts that contain compile directives
* Fixes a few failures in some gdb.base tests

Guinevere Larsen (2):
  gdb: Remove compile-related attributes from struct language
  gdb: add configure option to disable compile

 gdb/Makefile.in                               |  3 +-
 gdb/NEWS                                      |  4 +
 gdb/README                                    |  3 +
 gdb/c-lang.c                                  | 32 --------
 gdb/c-lang.h                                  | 38 ---------
 gdb/cli/cli-script.c                          |  4 +
 gdb/compile/compile-internal.h                | 39 +++++++++
 gdb/compile/compile.c                         | 81 ++++++++++++++++---
 gdb/config.in                                 |  3 +
 gdb/configure                                 | 39 ++++++++-
 gdb/configure.ac                              | 20 +++++
 gdb/dwarf2/loc.c                              | 12 +++
 gdb/language.c                                |  8 --
 gdb/language.h                                | 32 --------
 .../gdb.base/filename-completion.exp          | 14 ++--
 .../gdb.compile/compile-cplus-anonymous.exp   |  2 +
 .../gdb.compile/compile-cplus-array-decay.exp |  2 +
 .../gdb.compile/compile-cplus-inherit.exp     |  2 +
 .../gdb.compile/compile-cplus-member.exp      |  2 +
 .../gdb.compile/compile-cplus-method.exp      |  2 +
 .../gdb.compile/compile-cplus-namespace.exp   |  2 +
 .../gdb.compile/compile-cplus-nested.exp      |  2 +
 .../gdb.compile/compile-cplus-print.exp       |  2 +
 .../gdb.compile/compile-cplus-virtual.exp     |  2 +
 gdb/testsuite/gdb.compile/compile-cplus.exp   |  2 +
 gdb/testsuite/gdb.compile/compile-ifunc.exp   |  2 +
 gdb/testsuite/gdb.compile/compile-ops.exp     |  2 +
 gdb/testsuite/gdb.compile/compile-print.exp   |  2 +
 gdb/testsuite/gdb.compile/compile-setjmp.exp  |  2 +
 gdb/testsuite/gdb.compile/compile-tls.exp     |  2 +
 gdb/testsuite/gdb.compile/compile.exp         |  2 +
 gdb/testsuite/lib/compile-support.exp         |  3 +
 gdb/testsuite/lib/gdb.exp                     |  6 ++
 33 files changed, 244 insertions(+), 129 deletions(-)


base-commit: ea10be6e89a4569d03d61e5cf7418dc9a4015a24