Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Apr 2012 16:14:24 +0200
From:      Kristof Provost <kristof@sigsegv.be>
To:        current@freebsd.org
Cc:        Jilles Tjoelker <jilles@FreeBSD.org>
Subject:   Build error in bin/sh/jobs.c if DEBUG=2
Message-ID:  <20120401141423.GA22944@psyche>

next in thread | raw e-mail | index | archive | help
While chasing down an odd issue with alignment faults I activated
debugging in bin/sh.
bin/sh/Makefile has a commented out line (# DEBUG_FLAGS+= -g -DDEBUG=2
-fno-inline) to do this so that's what I did.

This fails to compile in bin/sh/jobs.c in vforkexecshell().
The debug TRACE() tries to print variables which don't exist.

The patch below fixes the compilation problem, but I'm unsure if it's
printing the relevant information.

Regards,
Kristof


diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c
index 335d2ca..9027b8c 100644
--- a/bin/sh/jobs.c
+++ b/bin/sh/jobs.c
@@ -893,8 +893,7 @@ vforkexecshell(struct job *jp, char **argv, char **envp, const char *path, int i
 	struct jmploc jmploc;
 	struct jmploc *savehandler;
 
-	TRACE(("vforkexecshell(%%%td, %p, %d) called\n", jp - jobtab, (void *)n,
-	    mode));
+	TRACE(("vforkexecshell(%%%td, %d) called\n", jp - jobtab, idx));
 	INTOFF;
 	flushall();
 	savehandler = handler;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120401141423.GA22944>