diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2016-07-20 14:40:08 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2016-07-20 14:50:21 +0300 |
commit | de7834e96602695db1cb6efd6238398b84d2ca60 (patch) | |
tree | 2fc49853a76d68a8db11aab24017843102fd22a8 /configure.ac | |
parent | fbb0df69ca498a4fb4689a6d12c2f05e2cfaf175 (diff) | |
download | gdbm-de7834e96602695db1cb6efd6238398b84d2ca60.tar.gz gdbm-de7834e96602695db1cb6efd6238398b84d2ca60.tar.bz2 |
Introduce debug hooks.
* configure.ac: New option --enable-debug
Print feature summary at the end of the run.
* src/debug.c: New file.
* src/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Build debug.o
Define GDBM_DEBUG_ENABLE.
* src/gdbmdefs.h [GDBM_DEBUG_ENABLE] (_gdbm_debug_hook_install)
(_gdbm_debug_hook_remove,_gdbm_debug_hook_check)
(_gdbm_debug_hook_val): New protos.
(GDBM_DEBUG_HOOK, GDBM_DEBUG_OVERRIDE)
(GDBM_DEBUG_ALLOC): New defines.
* src/gdbm.h.in (GDBM_RCVR_FORCE): New flag.
* src/recover.c (gdbm_recover): Check database before attempting
recovery, unless GDBM_RCVR_FORCE flag is set.
* doc/gdbm.texi: Document GDBM_RCVR_FORCE
* src/gdbmreorg.c (gdbm_reorganize): Use GDBM_RCVR_FORCE.
* src/gdbmtool.c (main): Always allocate file_name.
* src/bucket.c: Put GDBM_DEBUG_OVERRIDE and GDBM_DEBUG_ALLOC
in critical places.
* src/falloc.c: Likewise.
* src/findkey.c: Likewise.
* src/gdbmopen.c: Likewise.
* src/gdbmstore.c: Likewise.
* src/update.c: Likewise.
* tests/Makefile.am [GDBM_COND_DEBUG_ENABLE]: Define GDBM_DEBUG_ENABLE.
* tests/gtload.c: New options -hook, -recover, -verbose,
-backup, -max-failures, -max-failed-keys,
and -max-failed-buckets.
Attempt recovery after errors.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1424ea0..da5b938 100644 --- a/configure.ac +++ b/configure.ac @@ -173,15 +173,46 @@ fi AM_CONDITIONAL([GDBM_COND_READLINE], [test "$status_readline" = "yes"]) +# Additional debugging +AC_ARG_ENABLE([debug], + AC_HELP_STRING([--enable-debug], + [provide additional debugging functions]), + [status_debug=$withval], + [status_debug=no]) + +AM_CONDITIONAL([GDBM_COND_DEBUG_ENABLE], [test "$status_debug" = "yes"]) + # Initialize the test suite. AC_CONFIG_TESTDIR(tests) AC_CONFIG_FILES([tests/Makefile tests/atlocal po/Makefile.in]) AM_MISSING_PROG([AUTOM4TE], [autom4te]) +AC_CONFIG_COMMANDS([status],[ +cat <<EOF + +******************************************************************* +GDBM settings summary: + +Compatibility library ......................... $status_compat +Compatibility export tool ..................... $status_export +Memory mapped I/O ............................. $mapped_io +GNU Readline .................................. $status_readline +Debugging functions ........................... $status_debug +******************************************************************* + +EOF +], +[status_compat=$want_compat +status_export=$want_export +mapped_io=$mapped_io +status_readline=$status_readline +status_debug=$status_debug]) + AC_CONFIG_FILES([Makefile src/Makefile src/gdbm.h doc/Makefile compat/Makefile export/Makefile]) + AC_OUTPUT |