diff options
author | Justus Winter <justus@gnupg.org> | 2017-06-19 21:20:57 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2017-08-05 18:42:22 +0200 |
commit | 835b293d35a209d38047126443d41fa7090daa4c (patch) | |
tree | 5bf956895e6030f91cd618fb191b2151f6d25423 /proc/info.c | |
parent | dc0b5a43224999223a246870912b0f292b1980e9 (diff) | |
download | hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.gz hurd-835b293d35a209d38047126443d41fa7090daa4c.tar.bz2 hurd-835b293d35a209d38047126443d41fa7090daa4c.zip |
Use our own variant of 'assert' and 'assert_perror'.
Our variants print stack traces on failures. This will make locating
errors much easier.
Diffstat (limited to 'proc/info.c')
-rw-r--r-- | proc/info.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/proc/info.c b/proc/info.c index 79a4c37f..3c1bf6d3 100644 --- a/proc/info.c +++ b/proc/info.c @@ -27,7 +27,7 @@ #include <errno.h> #include <string.h> #include <sys/resource.h> -#include <assert.h> +#include <assert-backtrace.h> #include <hurd/msg.h> #include "proc.h" @@ -71,7 +71,7 @@ S_proc_pid2task (struct proc *callerp, if (! check_owner (callerp, p)) return EPERM; - assert (MACH_PORT_VALID (p->p_task)); + assert_backtrace (MACH_PORT_VALID (p->p_task)); *t = p->p_task; return 0; @@ -618,7 +618,7 @@ S_proc_getprocinfo (struct proc *callerp, pi->pgrp = p->p_pgrp->pg_pgid; pi->session = p->p_pgrp->pg_session->s_sid; for (tp = p; !tp->p_loginleader; tp = tp->p_parent) - assert (tp); + assert_backtrace (tp); pi->logincollection = tp->p_pid; if (p->p_dead || p->p_stopped) { @@ -837,7 +837,7 @@ S_proc_getloginid (struct proc *callerp, } for (p = proc; !p->p_loginleader; p = p->p_parent) - assert (p); + assert_backtrace (p); *leader = p->p_pid; return 0; |