From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 24 04:42:07 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E19165F9; Mon, 24 Dec 2012 04:42:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-oa0-f47.google.com (mail-oa0-f47.google.com [209.85.219.47]) by mx1.freebsd.org (Postfix) with ESMTP id 8A0788FC12; Mon, 24 Dec 2012 04:42:07 +0000 (UTC) Received: by mail-oa0-f47.google.com with SMTP id h1so6405878oag.6 for ; Sun, 23 Dec 2012 20:42:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xepCl21NmaZeEsKPWSJt6FJHroC22KjJbCtt/uxh9Cs=; b=erINL3vyoimXZ1rjOUtadT4NIH+7iDKFaHLUBBj1iCA/TCXvXkuyuR4Ne+tWcBTVwu fhULAqul3Sl0Ja6DR7HLYoW71FDgpf0k4Q0oXmRm8lRj9ZoryX2RLGrTcUNY+DuFRtsz HQtLM5rOMlvu37OT3aFztiFRNo4igw6tGggoLQeJW+qJX2AN6N0lzlgCVR8JJA/sOtgV gbvC6k6kHWwWXYOrJn60yKQeZIbW7VXQFNnCYCufs4CKr8Y9TqqUW30vioI920GE91P/ oceG6RR2Guv76kED8r2vu7sTpjwGGYBz5ygqrIPs/9cE7+F+/GEY4eGmgJlUF+KW4+8Z TKog== MIME-Version: 1.0 Received: by 10.60.3.167 with SMTP id d7mr4940638oed.85.1356324120988; Sun, 23 Dec 2012 20:42:00 -0800 (PST) Received: by 10.76.34.98 with HTTP; Sun, 23 Dec 2012 20:42:00 -0800 (PST) Received: by 10.76.34.98 with HTTP; Sun, 23 Dec 2012 20:42:00 -0800 (PST) In-Reply-To: References: <20121222164602.GB32022@sandvine.com> <1Tmb5f-000Jy5-CT@internal.tormail.org> <50D684D7.8050906@mu.org> Date: Sun, 23 Dec 2012 23:42:00 -0500 Message-ID: Subject: Re: [PATCH] Add WITH_DEBUG_FILES knob to enable separate debug files From: Mark Johnston To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-hackers@freebsd.org, Alfred Perlstein , Ed Maste , Jan Beich X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 04:42:08 -0000 On Dec 23, 2012 10:18 PM, "Garrett Cooper" wrote: > > On Sat, Dec 22, 2012 at 8:13 PM, Alfred Perlstein wrote: > > On 12/22/12 6:14 PM, Jan Beich wrote: > >> > >> Ed Maste writes: > >> > >>> When this knob is set standalone debug files for shared objects are > >>> built and installed in /usr/lib/debug/.debug. GDB > >>> searches this path for debug data. > >> > >> [...] > >> What about ports? They are not allowed to install outside of PREFIX. > >> > >> $ cd multimedia/cuse4bsd-kmod > >> $ make install PREFIX=/tmp/aaa PKG_DBDIR=/tmp/pkg WITH_DEBUG= > >> [...] > >> install -C -o root -g wheel -m 444 libcuse4bsd.a /tmp/aaa/lib > >> install -s -o root -g wheel -m 444 libcuse4bsd.so.1 /tmp/aaa/lib > >> install -o root -g wheel -m 444 libcuse4bsd.so.1.debug > >> /usr/lib/debug/tmp/aaa/lib > >> install: /usr/lib/debug/tmp/aaa/lib: No such file or directory > >> *** [_libinstall] Error code 71 > > > > I have a patch for this. I am building world to see what happens, if you > > want to try it, or comment on it, please let me know. > > > > Changes are: > > base DEBUGDIR on LIBDIR for ports > > create intermediate directories for debug objs. > > One thing about this (and the original patch) that may or may not > make sense is that DEBUGDIR should be undefined and passed in via > CFLAGS in the Makefile (reason being is that it would reduce > duplication IMO and it's less duplicated magic juju hanging around > some gdb header files). FWIW, newer versions of gdb have done this. > Another thing that might be a good idea is that the changes in > bsd.lib.mk diverge from standard expectations for the file extension > (.symbols -> .debug), so at the very least this should be documented. > Finally, what about debug symbols for programs (bsd.prog.mk)? I > assume that's coming soon, but I figured I should ask :). I have an extension of Ed's patch which handles bsd.prog.mk at http://people.freebsd.org/~markj/patches/debug_symbols/debug_symbols_full.patch > Thanks! > -Garrett > > PS Awesome solution for the ports issue :). > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"