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 | |||
173 | 173 | ||
174 | AM_CONDITIONAL([GDBM_COND_READLINE], [test "$status_readline" = "yes"]) | 174 | AM_CONDITIONAL([GDBM_COND_READLINE], [test "$status_readline" = "yes"]) |
175 | 175 | ||
176 | # Additional debugging | ||
177 | AC_ARG_ENABLE([debug], | ||
178 | AC_HELP_STRING([--enable-debug], | ||
179 | [provide additional debugging functions]), | ||
180 | [status_debug=$withval], | ||
181 | [status_debug=no]) | ||
182 | |||
183 | AM_CONDITIONAL([GDBM_COND_DEBUG_ENABLE], [test "$status_debug" = "yes"]) | ||
184 | |||
176 | # Initialize the test suite. | 185 | # Initialize the test suite. |
177 | AC_CONFIG_TESTDIR(tests) | 186 | AC_CONFIG_TESTDIR(tests) |
178 | AC_CONFIG_FILES([tests/Makefile tests/atlocal po/Makefile.in]) | 187 | AC_CONFIG_FILES([tests/Makefile tests/atlocal po/Makefile.in]) |
179 | AM_MISSING_PROG([AUTOM4TE], [autom4te]) | 188 | AM_MISSING_PROG([AUTOM4TE], [autom4te]) |
180 | 189 | ||
190 | AC_CONFIG_COMMANDS([status],[ | ||
191 | cat <<EOF | ||
192 | |||
193 | ******************************************************************* | ||
194 | GDBM settings summary: | ||
195 | |||
196 | Compatibility library ......................... $status_compat | ||
197 | Compatibility export tool ..................... $status_export | ||
198 | Memory mapped I/O ............................. $mapped_io | ||
199 | GNU Readline .................................. $status_readline | ||
200 | Debugging functions ........................... $status_debug | ||
201 | ******************************************************************* | ||
202 | |||
203 | EOF | ||
204 | ], | ||
205 | [status_compat=$want_compat | ||
206 | status_export=$want_export | ||
207 | mapped_io=$mapped_io | ||
208 | status_readline=$status_readline | ||
209 | status_debug=$status_debug]) | ||
210 | |||
181 | AC_CONFIG_FILES([Makefile | 211 | AC_CONFIG_FILES([Makefile |
182 | src/Makefile | 212 | src/Makefile |
183 | src/gdbm.h | 213 | src/gdbm.h |
184 | doc/Makefile | 214 | doc/Makefile |
185 | compat/Makefile | 215 | compat/Makefile |
186 | export/Makefile]) | 216 | export/Makefile]) |
217 | |||
187 | AC_OUTPUT | 218 | AC_OUTPUT |