From owner-freebsd-hackers@freebsd.org Sun Jan 3 13:38:34 2016 Return-Path: Delivered-To: freebsd-hackers@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 2EDD6A5F3BA for ; Sun, 3 Jan 2016 13:38:34 +0000 (UTC) (envelope-from robbinsondefau@gmail.com) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2D9E18A4 for ; Sun, 3 Jan 2016 13:38:33 +0000 (UTC) (envelope-from robbinsondefau@gmail.com) Received: by mail-ig0-x234.google.com with SMTP id ik10so63172349igb.1 for ; Sun, 03 Jan 2016 05:38:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=+OtP97j88XAAqxT45lcGkxBxGqCtpR8Ofi/F6af7dWI=; b=WG3l7X0UvbvcF1JTJ4yPmEbRc79lUdimcQMQ5FJ7Ux0hkK+KXlAL/t0EmXQGNOqQ+l oFFheiPAgpTGfe0KJOw/CLCp0EyPSVQSvBBf/a4N5OKcGy0iSPQ+Ro7GmqM823jgK1S4 Oo15o2KvYF7EpKSOzTNoaqsRE5L2ucwVkognCOhJznWtGxhOQXtVMpwDb705xaxB8/Yh fea7gMBoXsUX0KqCO24Pjek2oEAXjmmnQ8Vd8H2d55xD3FHTsVN+lY6k0Ylfb8p0KGZT py9XKuaOwRmkb0kb0xmzbj3LNWlxgH8ROhnotL26Xpwd5QyvZnhKFStboP2ntVxQxNRE Ok/Q== MIME-Version: 1.0 X-Received: by 10.50.147.73 with SMTP id ti9mr18851630igb.36.1451828313369; Sun, 03 Jan 2016 05:38:33 -0800 (PST) Received: by 10.36.29.20 with HTTP; Sun, 3 Jan 2016 05:38:33 -0800 (PST) Date: Sun, 3 Jan 2016 14:38:33 +0100 Message-ID: Subject: variables optimized out From: robbinson defau To: freebsd-hackers@freebsd.org X-Mailman-Approved-At: Sun, 03 Jan 2016 13:57:17 +0000 Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2016 13:38:34 -0000 Hi all, Im debugging some issues in the kernel and as the kernel is compiled by default with -O2, a lot of variables are optimized out. So i made changes to make.conf (CFLAGS and COPTFLAGS).\ All builds fine, but I get the weirdest of panics that most certainly not happen with -O2. So it's likely i'm doing something wrong. What would be the correct way to be able to debug the kernel and have it build such that locals and function arguments are not optimized out? Thanks in advance, /DF