From owner-freebsd-current@FreeBSD.ORG Sun Apr 1 14:14:56 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0ED6106566C; Sun, 1 Apr 2012 14:14:56 +0000 (UTC) (envelope-from kp@sigsegv.be) Received: from mercury.codepro.be (mercury.codepro.be [IPv6:2001:4b98:dc0:51:216:3eff:feb7:3147]) by mx1.freebsd.org (Postfix) with ESMTP id 63A5C8FC0C; Sun, 1 Apr 2012 14:14:56 +0000 (UTC) Received: from adrastea.jupiter.sigsegv.be (adrastea.jupiter.sigsegv.be [IPv6:2001:6f8:1498:1::3]) by mercury.codepro.be (Postfix) with ESMTP id 39560356; Sun, 1 Apr 2012 16:14:55 +0200 (CEST) Received: from psyche.jupiter.sigsegv.be (unknown [IPv6:2001:6f8:1498:0:f2de:f1ff:fe72:6dcb]) by adrastea.jupiter.sigsegv.be (Postfix) with ESMTP id 7D72D7A0E; Sun, 1 Apr 2012 16:14:24 +0200 (CEST) Received: from kp by psyche.jupiter.sigsegv.be with local (Exim 4.77) (envelope-from ) id 1SELY0-00061u-B9; Sun, 01 Apr 2012 16:14:24 +0200 Date: Sun, 1 Apr 2012 16:14:24 +0200 From: Kristof Provost To: current@freebsd.org Message-ID: <20120401141423.GA22944@psyche> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-PGP-Fingerprint: E114 D9EA 909E D469 8F57 17A5 7D15 91C6 9EFA F286 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Jilles Tjoelker Subject: Build error in bin/sh/jobs.c if DEBUG=2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2012 14:14:56 -0000 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;