mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-22 09:46:37 +08:00
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.
This commit is contained in:
@ -71,9 +71,14 @@ extern "C"
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (ENABLE_LIBCTF_HASH_DEBUGGING) && !defined (NDEBUG)
|
||||
#include <assert.h>
|
||||
#define ctf_assert(fp, expr) (assert (expr), 1)
|
||||
#else
|
||||
#define ctf_assert(fp, expr) \
|
||||
_libctf_unlikely_ (ctf_assert_internal (fp, __FILE__, __LINE__, \
|
||||
#expr, !!(expr)))
|
||||
#endif
|
||||
|
||||
/* libctf in-memory state. */
|
||||
|
||||
|
Reference in New Issue
Block a user