Re: [PATCH v3] gdb, configure: Add disable-formats option for configure

Tom Tromey
2025-04-03T17:36:00Z

>>>>> "Guinevere" == Guinevere Larsen <guinevere@redhat.com> writes:

Guinevere> GDB has support for many binary file formats, some which might be very
Guinevere> unlikely to be found in some situations (such as the COFF format in
Guinevere> linux). This commit introduces the option for a user to choose which
Guinevere> formats GDB will support at build configuration time.

Guinevere> +* Configure changes
Guinevere> +
Guinevere> +enable-binary-file-formats=[FORMAT,...]
Guinevere> +enable-binary-file-formats=all

Add the leading "--" here?
I didn't look to see what other NEWS entries do.

Guinevere> +# Object files to be used when building with support for all file formats.
Guinevere> +all_binary_format_obs="dbxread.o mipsread.o coffread.o coff-pe-read.o xcoffread.o"

I would much rather have this kind of information in the Makefile. I
know gdb doesn't always do that right now -- but the current way is kind
of bad IMO.

We can use GNU make features, so it's not hard to transform a list of
formats like "elf xcoff" into a list of variable references like
"$(elf_OBJS) $(xcoff_OBJS)"

Guinevere> diff --git a/gdb/configure.format b/gdb/configure.format

Then we wouldn't need this file, either.

Tom