Date: Tue, 8 Apr 2014 21:17:53 -0600 From: Warner Losh <imp@bsdimp.com> To: Ian Lepore <ian@FreeBSD.org> Cc: Steve Kargl <sgk@troutmask.apl.washington.edu>, freebsd-arch <freebsd-arch@FreeBSD.org> Subject: Re: Time for turning off gdb by default? Or worse... Message-ID: <A2053A11-FDFD-4D72-A15B-8E5378E6BF7F@bsdimp.com> In-Reply-To: <1396995427.81853.449.camel@revolution.hippie.lan> References: <DD38131E-9A43-4EFA-A27D-ED6B64F6A35A@bsdimp.com> <20140408212435.GA75404@troutmask.apl.washington.edu> <57ECB078-3D7A-4BE8-AA29-1ED7BB347DBD@bsdimp.com> <1396995427.81853.449.camel@revolution.hippie.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 8, 2014, at 4:17 PM, Ian Lepore <ian@FreeBSD.org> wrote: > On Tue, 2014-04-08 at 15:43 -0600, Warner Losh wrote: >> On Apr 8, 2014, at 3:24 PM, Steve Kargl <sgk@troutmask.apl.washington.edu> wrote: >> >>> On Tue, Apr 08, 2014 at 02:34:35PM -0600, Warner Losh wrote: >>> >>> (courtesy line wrap to something well below 80 characters) >>> >>>> The gdb in the tree seems to be of very limited usefulness >>>> these days. It doesn?t seem to work on clang-enabled >>>> architectures w/o building -gdwarf-2, it doesn?t seem to work >>>> with threaded applications, and on some architectures it >>>> doesn?t seem to work at all (mips comes to mind, but it may >>>> have been the two binaries I tried). >>>> >>> >>> (patch removed) >>> >>>> to the tree, which will turn gdb off by default. It may make >>>> more sense to just remove it entirely, but I?m not sure I want >>>> to go there just yet in case there are things that I?m missing. >>>> I believe that the port will be adequate for all architectures >>>> we support, but haven?t tested this directly yet. I do know >>>> that on amd64, the port just worked, where the in-tree gdb >>>> was an epic fail. >>> >>> I suppose the obvious questions are: >>> >>> 1) Is lldb ready for prime time? >> >> Doesnąt matter. >> >>> 2) What effect does this have on kgdb? Note, /sys/conf/NOTES contains >> >> Unfortunately, kgdb isnąt available as a port, so that does matter. It is one thing arguing against this change. >> >>> #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols >>> >>> Should this be updates to DEBUG=-gdwarf-2? >> >> Nope. It should stay exactly as it is. We convert -g to -gdwarf-2 for those compilers that need it. > > Only when building the kernel. For userland we've got nothing. gdb > aside, even addr2line doesn't work on userland binaries anymore. It > used to be hard to do debugging for arm. Now it's impossible. I thought Iąve had it work when I used DEBUG_FLAGS=-gdwarf-2 rather than DEBUG_FLAGS=-g. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A2053A11-FDFD-4D72-A15B-8E5378E6BF7F>
