From owner-freebsd-arch@FreeBSD.ORG Wed Apr 9 03:18:02 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0FA0C2C for ; Wed, 9 Apr 2014 03:18:02 +0000 (UTC) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 816781D8A for ; Wed, 9 Apr 2014 03:18:02 +0000 (UTC) Received: by mail-pb0-f45.google.com with SMTP id uo5so1900304pbc.18 for ; Tue, 08 Apr 2014 20:17:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=BcwC6/OK8k5QcmNtGi4tGsDbIsBBupgTip94vuPpJQs=; b=PpTuO3bmQ2HVcsdSzzBgM+fiUUiAXxby08bdoARuUR5Kf5xuHZ7BLS5dmL9JQZAnVM jV7uTGzgfX4DNQ8KEsDvJiF7kKSpoMptk76ybdx9Ye+vj1jSbMMwJefrGRmgWuTYznZf LdgVHdHrhB394mrHjN8Vk9faCNdKLi3ZWFbSASqEESyfO/Zl2IsojFpRG4k7PLbzt6n4 FC+/hFZUnPZZbikhG5zC4ExWSeuOTSNh/KUn9XO7T+dJqArzw5a/OOriXvwcVq2KB7CI D6hwGrwf326E1usOfoJ1G6Fqg8U5xvTcO//Y9jAF2BwUQLJo/rBODnc4NKAbpbICHIa7 SMAw== X-Gm-Message-State: ALoCoQkds0h6eMEfahBM1+6Wvratf7NvGCaVuMV/VsX+Gv0O70uvs1sM2tSOc5VYBs4L+Jeq2wHc X-Received: by 10.68.250.3 with SMTP id yy3mr8991187pbc.56.1397013476423; Tue, 08 Apr 2014 20:17:56 -0700 (PDT) Received: from [10.64.24.116] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id qq5sm7896935pbb.24.2014.04.08.20.17.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Apr 2014 20:17:55 -0700 (PDT) Sender: Warner Losh Content-Type: text/plain; charset=iso-8859-7 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: Time for turning off gdb by default? Or worse... From: Warner Losh In-Reply-To: <1396995427.81853.449.camel@revolution.hippie.lan> Date: Tue, 8 Apr 2014 21:17:53 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20140408212435.GA75404@troutmask.apl.washington.edu> <57ECB078-3D7A-4BE8-AA29-1ED7BB347DBD@bsdimp.com> <1396995427.81853.449.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1874) Cc: Steve Kargl , freebsd-arch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 03:18:02 -0000 On Apr 8, 2014, at 4:17 PM, Ian Lepore wrote: > On Tue, 2014-04-08 at 15:43 -0600, Warner Losh wrote: >> On Apr 8, 2014, at 3:24 PM, Steve Kargl = wrote: >>=20 >>> On Tue, Apr 08, 2014 at 02:34:35PM -0600, Warner Losh wrote: >>>=20 >>> (courtesy line wrap to something well below 80 characters) >>>=20 >>>> 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). >>>>=20 >>>=20 >>> (patch removed) >>>=20 >>>> 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. >>>=20 >>> I suppose the obvious questions are: >>>=20 >>> 1) Is lldb ready for prime time? >>=20 >> Doesn=A2t matter. >>=20 >>> 2) What effect does this have on kgdb? Note, /sys/conf/NOTES = contains >>=20 >> Unfortunately, kgdb isn=A2t available as a port, so that does matter. = It is one thing arguing against this change. >>=20 >>> #makeoptions DEBUG=3D-g #Build kernel with = gdb(1) debug symbols >>>=20 >>> Should this be updates to DEBUG=3D-gdwarf-2? >>=20 >> Nope. It should stay exactly as it is. We convert -g to -gdwarf-2 for = those compilers that need it. >=20 > 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=A2ve had it work when I used DEBUG_FLAGS=3D-gdwarf-2 rather = than DEBUG_FLAGS=3D-g. Warner=