From a9b9870206658564272fe17d2079ed9eb6ffb15f Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 5 Jun 2020 18:38:03 +0100 Subject: libctf, dedup: add new configure option --enable-libctf-hash-debugging Add a new debugging configure option, --enable-libctf-hash-debugging, off by default, which lets you configure in expensive internal consistency checks and enable the printing of debugging output when LIBCTF_DEBUG=t before type deduplication has happened. In this commit we just add the option and cause it to turn ctf_assert into a real, hard assert for easier debugging. libctf/ * configure.ac: Add --enable-libctf-hash-debugging. * aclocal.m4: Pull in enable.m4, for GCC_ENABLE. * Makefile.in: Regenerated. * configure: Likewise. * config.h.in: Likewise. * ctf-impl.h [ENABLE_LIBCTF_HASH_DEBUGGING] (ctf_assert): Define to assert. --- libctf/configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libctf/configure.ac') diff --git a/libctf/configure.ac b/libctf/configure.ac index 26b062e..3799a0c 100644 --- a/libctf/configure.ac +++ b/libctf/configure.ac @@ -67,6 +67,12 @@ AC_FUNC_MMAP AC_SEARCH_LIBS(dlopen, dl) AM_ZLIB +GCC_ENABLE([libctf-hash-debugging], [no], [], [Enable expensive debugging of CTF deduplication type hashing]) +if test "${enable_libctf_hash_debugging}" = yes; then + AC_DEFINE(ENABLE_LIBCTF_HASH_DEBUGGING, 1, [Enable expensive debugging of CTF deduplication type hashing]) +fi +AM_CONDITIONAL(ENABLE_LIBCTF_HASH_DEBUGGING, test "${enable_libctf_hash_debugging}" = yes) + # Similar to GDB_AC_CHECK_BFD. OLD_CFLAGS=$CFLAGS OLD_LDFLAGS=$LDFLAGS -- cgit v1.1