Date: Sat, 13 Aug 2016 11:55:03 -0400 From: Gordon Ross <gordon.w.ross@gmail.com> To: freebsd-hackers@freebsd.org Subject: Re: How to get better debugging for the kernel. Message-ID: <CAD0Ztp3V3K4-MFPaLY0D9U968eB1uf%2BEUuTkhyn0SnzS9DVonA@mail.gmail.com> In-Reply-To: <CA%2BGoQ8pYq7Bic8Jx=f_%2B-yrx59yE%2BnV27wF_rNWaefcOELwjBg@mail.gmail.com> References: <CACpH0Mcw1oTatUX3d7gJ4ys=dAj_y9C9vF_g110MrHVEup4mjQ@mail.gmail.com> <5cc825d5-9ed7-efac-b711-60a8d4b18cc4@FreeBSD.org> <CAHM0Q_OHE%2Bj1TfnYfJ7w1v7MpbRTcwE7mQnpnyY=GG%2BDHzwETg@mail.gmail.com> <1551519.RkbAThDAeZ@ralph.baldwin.cx> <CA%2BGoQ8pYq7Bic8Jx=f_%2B-yrx59yE%2BnV27wF_rNWaefcOELwjBg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sbahra@backtrace.io> wrote: > Slides up at: http://backtrace.io/blog/images/bbcon2016-sbahra.pdf > > On Fri, Aug 12, 2016 at 4:32 PM John Baldwin <jhb@freebsd.org> wrote: > >> On Thursday, August 04, 2016 01:07:39 AM K. Macy wrote: >> > On Wed, Aug 3, 2016 at 12:53 PM, Andriy Gapon <avg@freebsd.org> 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAD0Ztp3V3K4-MFPaLY0D9U968eB1uf%2BEUuTkhyn0SnzS9DVonA>