diff options
Diffstat (limited to 'templates/wrapfuncs.c')
-rw-r--r-- | templates/wrapfuncs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/templates/wrapfuncs.c b/templates/wrapfuncs.c index 86fd557..faac1b7 100644 --- a/templates/wrapfuncs.c +++ b/templates/wrapfuncs.c @@ -39,17 +39,20 @@ ${maybe_async_skip} ${rc_return} } - pseudo_debug(4, "called: ${name}\n"); + pseudo_debug(PDBGF_WRAPPER, "wrapper called: ${name}\n"); pseudo_sigblock(&saved); + pseudo_debug(PDBGF_WRAPPER | PDBGF_VERBOSE, "${name} - signals blocked, obtaining lock\n"); if (pseudo_getlock()) { errno = EBUSY; sigprocmask(SIG_SETMASK, &saved, NULL); + pseudo_debug(PDBGF_WRAPPER, "${name} failed to get lock, giving EBUSY.\n"); ${def_return} } int save_errno; if (antimagic > 0) { /* call the real syscall */ + pseudo_debug(PDBGF_SYSCALL, "${name} calling real syscall.\n"); ${rc_assign} (*real_${name})(${call_args}); } else { ${alloc_paths} @@ -62,13 +65,14 @@ ${maybe_async_skip} save_errno = errno; pseudo_droplock(); sigprocmask(SIG_SETMASK, &saved, NULL); + pseudo_debug(PDBGF_WRAPPER | PDBGF_VERBOSE, "${name} - yielded lock, restored signals\n"); #if 0 /* This can cause hangs on some recentish systems which use locale * stuff for strerror... */ - pseudo_debug(4, "completed: $name (maybe: %s)\n", strerror(save_errno)); + pseudo_debug(PDBGF_WRAPPER, "wrapper completed: ${name} (maybe: %s)\n", strerror(save_errno)); #endif - pseudo_debug(4, "completed: $name (errno: %d)\n", save_errno); + pseudo_debug(PDBGF_WRAPPER, "wrapper completed: ${name} (errno: %d)\n", save_errno); errno = save_errno; ${rc_return} } |