aboutsummaryrefslogtreecommitdiff
path: root/proc/main.c
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-06-19 21:20:57 +0200
committerJustus Winter <justus@gnupg.org>2017-08-05 18:42:22 +0200
commit835b293d35a209d38047126443d41fa7090daa4c (patch)
tree5bf956895e6030f91cd618fb191b2151f6d25423 /proc/main.c
parentdc0b5a43224999223a246870912b0f292b1980e9 (diff)
downloadhurd-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/main.c')
-rw-r--r--proc/main.c10
1 files changed, 5 insertions, 5 deletions
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 <hurd/paths.h>
#include <hurd/startup.h>
#include <device/device.h>
-#include <assert.h>
+#include <assert-backtrace.h>
#include <argp.h>
#include <error.h>
#include <version.h>
@@ -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. */