From owner-freebsd-hackers@freebsd.org Sat Aug 13 15:55:04 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 C5958BB83FB for ; Sat, 13 Aug 2016 15:55:04 +0000 (UTC) (envelope-from gordon.w.ross@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (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 8ED881C2C for ; Sat, 13 Aug 2016 15:55:04 +0000 (UTC) (envelope-from gordon.w.ross@gmail.com) Received: by mail-io0-x231.google.com with SMTP id m101so49246810ioi.2 for ; Sat, 13 Aug 2016 08:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=os4MGWpgWl5WjDQD2nHew4z9ToSFNBI0aiQcMZ+oakA=; b=e+HHM7LQhqS8Zn9wEsedwICcmZ/Hu/CWi/V+kO/8QTVAENSaMC3/gr9Fs+ej78saFK u6WW+But6feLHHBKspBqT9w6CB0YALGmJ2c5QmUCJsfvTAWZBwNDG6VqNk6hI2lE/48y MwzqGsnkIuJcG7QHKIxod/y/lDULOD7TCstXVMD2sewPyABBzOZ7KiefqB4dPYoopyAj 8OcNYL4VWHgdthYi9g5p7sQKbaqHhpcawslQDCyGFs6Nbc93chhqCe+lACTR/AwuBmmU I+BGaozLhWNFKLPi382PPe0ohS93zt45LNYG6T/HAByo+lxNol6mQiQBlL78Vutrt+to 6GlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=os4MGWpgWl5WjDQD2nHew4z9ToSFNBI0aiQcMZ+oakA=; b=ANlc43LiX7EEqqRb+Zfc/Wy4FBt9vOybZcB7A7yG8JGq3LgrZUo6SN3xKP2AUjWcfz wEF18M99FvsANxcrjKkcJ+RstTb2zU8weP38jI6NHdphJkHFwTMny1BjKqcX/XlNOrY9 h0Tag0flwzh8G4xIcaoq7Zf0tv+MTKdomzephrvd7vfGZRc4O+qDEE3UhDshUUsmXo9W pepseC0P7l+SxkdAY33ccyOSaC3YFhi/D86RrGR/0mWJ0luDql3+HhPZ/NEVm0SfguED +vMQA9eiiac9b6CPDlmto59bBQ573ju9141FpF/7wKOLvPxsHj1cN9rc3bdUsiiOewj4 ghgg== X-Gm-Message-State: AEkoouuqi9fV0ZhnRCAANX3YxbQjcnLmZ1nYbAj1/FI7N1PLzqaClIJrFxGaWGYsQN3JafhXH2OUvcN0uihZYQ== X-Received: by 10.107.146.195 with SMTP id u186mr23613305iod.112.1471103703716; Sat, 13 Aug 2016 08:55:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.17.79 with HTTP; Sat, 13 Aug 2016 08:55:03 -0700 (PDT) In-Reply-To: References: <5cc825d5-9ed7-efac-b711-60a8d4b18cc4@FreeBSD.org> <1551519.RkbAThDAeZ@ralph.baldwin.cx> From: Gordon Ross Date: Sat, 13 Aug 2016 11:55:03 -0400 Message-ID: Subject: Re: How to get better debugging for the kernel. To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Aug 2016 15:55:04 -0000 I heard a rumor someone might be working on a port of illumos "mdb". Anyone know if that's true, and how far along it went? We depend heavily upon this tool for production support; so much that I'm not sure how we'd live without it. On Fri, Aug 12, 2016 at 4:39 PM, Samy Bahra wrote: > Slides up at: http://backtrace.io/blog/images/bbcon2016-sbahra.pdf > > On Fri, Aug 12, 2016 at 4:32 PM John Baldwin wrote: > >> On Thursday, August 04, 2016 01:07:39 AM K. Macy wrote: >> > On Wed, Aug 3, 2016 at 12:53 PM, Andriy Gapon wrote: >> > > On 03/08/2016 20:14, Ryan Stone wrote: >> > >> Are you using the kgdb from the base system or from ports(it's a part >> of >> > >> devel/gdb)? The kgdb in ports is significantly better. If you >> haven't >> > >> tried the version from ports already, definitely do that first. >> > > >> > > kgdb 7.x from ports is certainly more powerful than the old base kgdb, >> > > but clang with O2 optimizations seems to be too much even for it. >> > >> > Samy did a good presentation about this issue. I'm hoping I can get >> > him to put his slides on line. Evidently clang is much more simplistic >> > about how it treats callee saved registers. In essence clang will >> > always err on the side of saying "optimized out" even when it has >> > sufficient state to know otherwise. Gcc, on the other hand will >> > sometimes incorrectly infer that a value is valid when it is in fact >> > not. >> > >> > I have been building some kernels with clang with dwarf4 enabled (and >> > thus needed to use kgdb 7.x from ports). Contrary to what I have heard >> > from some others I have found it to have virtually no added benefit. >> >> My understanding is that dwarf4 will not help with C programs like the >> kernel, that the new idioms in dwarf4 are for declaring more complex >> constructs in C++11, C++14, etc. I have heard that clang does not update >> debug information during optimization passes causing it to loose track of >> variables that are moved during optimization. I have not (yet) tried >> using gcc as avg@ describes though I will likely start doing so soon. >> >> -- >> John Baldwin >> > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"