From 835b293d35a209d38047126443d41fa7090daa4c Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 19 Jun 2017 21:20:57 +0200 Subject: Use our own variant of 'assert' and 'assert_perror'. Our variants print stack traces on failures. This will make locating errors much easier. --- proc/info.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'proc/info.c') 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 #include #include -#include +#include #include #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; -- cgit v1.2.3