+2020-03-12 Simon Marchi <simon.marchi@efficios.com>
+
+ * Makefile.in (SUBDIR_UNITTESTS_SRCS): Rename to...
+ (SELFTESTS_SRCS): ... this. Add disasm-selftests.c,
+ gdbarch-selfselftests.c and selftest-arch.c.
+ (SUBDIR_UNITTESTS_OBS): Rename to...
+ (SELFTESTS_OBS): ... this.
+ (COMMON_SFILES): Remove disasm-selftests.c and
+ gdbarch-selftests.c.
+ * configure.ac: Don't add selftest-arch.{c,o} to
+ CONFIG_{SRCS,OBS}.
+ * disasm-selftests.c, gdbarch-selftests.c: Remove GDB_SELF_TEST
+ preprocessor conditions.
+
2020-03-12 Simon Marchi <simon.marchi@efficios.com>
* configure.ac: Don't source bfd/development.sh.
SUBDIR_PYTHON_LDFLAGS =
SUBDIR_PYTHON_CFLAGS =
-SUBDIR_UNITTESTS_SRCS = \
+SELFTESTS_SRCS = \
+ disasm-selftests.c \
+ gdbarch-selftests.c \
+ selftest-arch.c \
unittests/array-view-selftests.c \
unittests/child-path-selftests.c \
unittests/cli-utils-selftests.c \
unittests/vec-utils-selftests.c \
unittests/xml-utils-selftests.c
-SUBDIR_UNITTESTS_OBS = $(patsubst %.c,%.o,$(SUBDIR_UNITTESTS_SRCS))
+SELFTESTS_OBS = $(patsubst %.c,%.o,$(SELFTESTS_SRCS))
SUBDIR_TARGET_SRCS = target/waitstatus.c
SUBDIR_TARGET_OBS = $(patsubst %.c,%.o,$(SUBDIR_TARGET_SRCS))
debuginfod-support.c \
dictionary.c \
disasm.c \
- disasm-selftests.c \
dummy-frame.c \
dwarf2/abbrev.c \
dwarf2/attribute.c \
gdb_obstack.c \
gdb_regex.c \
gdbarch.c \
- gdbarch-selftests.c \
gdbtypes.c \
gnu-v2-abi.c \
gnu-v3-abi.c \
$as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
- CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest-arch.o"
- CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) selftest-arch.c"
+ CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
fi
[Define to be a string naming the default host character set.])
GDB_AC_SELFTEST([
- CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest-arch.o"
- CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) selftest-arch.c"
+ CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
])
GDB_AC_TRANSFORM([gdb], [GDB_TRANSFORM_NAME])
#include "defs.h"
#include "disasm.h"
-
-#if GDB_SELF_TEST
#include "gdbsupport/selftest.h"
#include "selftest-arch.h"
#include "gdbarch.h"
}
} // namespace selftests
-#endif /* GDB_SELF_TEST */
void _initialize_disasm_selftests ();
void
_initialize_disasm_selftests ()
{
-#if GDB_SELF_TEST
selftests::register_test_foreach_arch ("print_one_insn",
selftests::print_one_insn_test);
selftests::register_test_foreach_arch ("memory_error",
selftests::memory_error_test);
-#endif
}
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
-#if GDB_SELF_TEST
#include "gdbsupport/selftest.h"
#include "selftest-arch.h"
#include "inferior.h"
}
} // namespace selftests
-#endif /* GDB_SELF_TEST */
void _initialize_gdbarch_selftests ();
void
_initialize_gdbarch_selftests ()
{
-#if GDB_SELF_TEST
selftests::register_test_foreach_arch ("register_to_value",
selftests::register_to_value_test);
-#endif
}