Unconditionally define _initialize_addrmap

The way that init.c is generated does not allow for an initialization
function to be conditionally defined -- doing so will result in a link
error.

This patch fixes a build problem that arises from such a conditional
definition.  It can be reproduce with --disable-unit-tests.
This commit is contained in:
Tom Tromey
2021-08-06 12:30:51 -06:00
parent b9f3fbc9f3
commit fd98618334

View File

@@ -681,11 +681,13 @@ test_addrmap ()
}
} // namespace selftests
#endif /* GDB_SELF_TEST */
void _initialize_addrmap ();
void
_initialize_addrmap ()
{
#if GDB_SELF_TEST
selftests::register_test ("addrmap", selftests::test_addrmap);
}
#endif /* GDB_SELF_TEST */
}