better debugging messages.

This commit is contained in:
christos 2011-03-04 04:17:12 +00:00
parent 22701ee034
commit 1428cd07df

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_exec.c,v 1.309 2011/03/01 18:53:10 joerg Exp $ */
/* $NetBSD: kern_exec.c,v 1.310 2011/03/04 04:17:12 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.309 2011/03/01 18:53:10 joerg Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.310 2011/03/04 04:17:12 christos Exp $");
#include "opt_ktrace.h"
#include "opt_modular.h"
@ -823,10 +823,19 @@ execve1(struct lwp *l, const char *path, char * const *args,
if (error) {
size_t j;
struct exec_vmcmd *vp = &pack.ep_vmcmds.evs_cmds[0];
uprintf("vmcmds %zu/%u, error %d\n", i,
pack.ep_vmcmds.evs_used, error);
for (j = 0; j <= i; j++)
uprintf(
"vmcmd[%zu] = %#"PRIxVADDR"/%#"PRIxVSIZE" fd@%#"PRIxVSIZE" prot=0%o flags=%d\n",
j, vp[j].ev_addr, vp[j].ev_len,
uprintf("vmcmd[%zu] = vmcmd_map_%s %#"
PRIxVADDR"/%#"PRIxVSIZE" fd@%#"
PRIxVSIZE" prot=0%o flags=%d\n", j,
vp[j].ev_proc == vmcmd_map_pagedvn ?
"pagedvn" :
vp[j].ev_proc == vmcmd_map_readvn ?
"readvn" :
vp[j].ev_proc == vmcmd_map_zero ?
"zero" : "*unknown*",
vp[j].ev_addr, vp[j].ev_len,
vp[j].ev_offset, vp[j].ev_prot,
vp[j].ev_flags);
}