aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-07-20 14:40:08 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-07-20 14:50:21 +0300
commitde7834e96602695db1cb6efd6238398b84d2ca60 (patch)
tree2fc49853a76d68a8db11aab24017843102fd22a8 /doc
parentfbb0df69ca498a4fb4689a6d12c2f05e2cfaf175 (diff)
downloadgdbm-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 'doc')
-rw-r--r--doc/gdbm.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/gdbm.texi b/doc/gdbm.texi
index 866a672..7f93046 100644
--- a/doc/gdbm.texi
+++ b/doc/gdbm.texi
@@ -1135,6 +1135,13 @@ The caller is responsible for freeing that memory when no longer needed.
@end deftypecv
@end deftypefn
+@kwindex GDBM_RCVR_FORCE
+By default, @code{gdbm_recovery} first checks the database fo
+inconsistencies and attempts recovery only if some were found.
+The special flag bit @code{GDBM_RCVR_FORCE} instructs
+@code{gdbm_recovery} to omit this check and to force recovery
+unconditionally.
+
@node Options
@chapter Setting options
@cindex database options

Return to:

Send suggestions and report system problems to the System administrator.