Re: Running selftests in GDB

Maciej W. Rozycki
2020-10-04T15:52:32Z

On Mon, 28 Sep 2020, Eli Zaretskii via Gdb wrote:

> > By default, GDB built from a release tarball doesn't include the
> > selftest. I've configured GDB with --enable-unit-tests, and then some
> > selftests are available. But not all: a development version runs 63
> > unit tests, whereas the release version configured with unit tests
> > runs only 24.
> >
> > How do I enable all the selftests that are available in the
> > development build?
>
> Answering myself: after reconfiguring with --enable-unit-tests, one
> should make sure gdb/init.c is regenerated. It looks like it won't be
> regenerated, unless you touch one of the source files mentioned in
> COMMON_SFILES by gdb/Makefile.

It looks like a dependency needs to be added to gdb/Makefile.in for
gdb/init.c on whatever is changed with `--enable-unit-tests' that affects
the file; can you run a diff on the object tree configured with and
without the option to figure out what has changed that affects gdb/init.c?

Maciej