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/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'proc/main.c') diff --git a/proc/main.c b/proc/main.c index e615f363..0a6f9916 100644 --- a/proc/main.c +++ b/proc/main.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -165,7 +165,7 @@ main (int argc, char **argv, char **envp) initialize_version_info (); err = task_get_bootstrap_port (mach_task_self (), &boot); - assert_perror (err); + assert_perror_backtrace (err); if (boot == MACH_PORT_NULL) error (2, 0, "proc server can only be run by startup during boot"); @@ -187,14 +187,14 @@ main (int argc, char **argv, char **envp) /* Create our own proc object. */ self_proc = allocate_proc (mach_task_self ()); - assert (self_proc); + assert_backtrace (self_proc); complete_proc (self_proc, HURD_PID_PROC); startup_port = ports_get_send_right (startup_proc); err = startup_procinit (boot, startup_port, &startup_proc->p_task, &authserver, &_hurd_host_priv, &_hurd_device_master); - assert_perror (err); + assert_perror_backtrace (err); mach_port_deallocate (mach_task_self (), startup_port); /* Get our stderr set up to print on the console, in case we have @@ -252,7 +252,7 @@ main (int argc, char **argv, char **envp) startup_fallback = 1; err = mach_port_deallocate (mach_task_self (), startup); - assert_perror (err); + assert_perror_backtrace (err); } else /* Fall back to abusing the message port lookup. */ -- cgit v1.2.3