Running selftests in GDB

Maciej W. Rozycki macro@linux-mips.org
Sun Oct 4 15:52:29 GMT 2020


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


More information about the Gdb mailing list