From owner-freebsd-toolchain@freebsd.org Mon Jan 2 16:09:08 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E247C9C5F6; Mon, 2 Jan 2017 16:09:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C82B1731; Mon, 2 Jan 2017 16:09:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 3A4E310A746; Mon, 2 Jan 2017 11:09:00 -0500 (EST) From: John Baldwin To: freebsd-ppc@freebsd.org Cc: Mark Millard , FreeBSD Toolchain Subject: Re: 6.2.0 based devel/powerpc64-gcc rejects sys/powerpc/powerpc/db_trace.c for very old code Date: Mon, 02 Jan 2017 08:07:57 -0800 Message-ID: <12096354.3ltMFWEP1d@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 02 Jan 2017 11:09:00 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2017 16:09:08 -0000 On Tuesday, December 27, 2016 12:37:08 AM Mark Millard wrote: > I have submitted: > > Bug 215600 - devel/powerpc64-gcc based buildkernel: sys/powerpc/powerpc/db_trace.c rejected for: '__builtin_frame_address' with a nonzero argument is unsafe > > sys/powerpc/powerpc/db_trace.c -r132070 2004-Jul-12 is when this > __builtin_frame_address use was introduced: > > void > db_trace_self(void) > { > db_addr_t addr; > > addr = (db_addr_t)__builtin_frame_address(1); > db_backtrace(curthread, addr, -1); > } > > > > head was at -r310556 for this discovery but with a patch for libdwarf > in ctfconvert to enable buildkernel to get this far. I have not yet > updated to the 6.3.0 based devel/powerpc64-gcc . Try using '0' instead of '1'. You might get an extra frame in the backtrace compared to before. A simple way to test is to add 'options KDB_TRACE' and then trigger a panic (e.g. sysctl debug.kdb.panic=1) -- John Baldwin