From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 22 18:09:54 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 D85E345A; Sat, 22 Dec 2012 18:09:54 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id B99C68FC12; Sat, 22 Dec 2012 18:09:54 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 282811A3C2A; Sat, 22 Dec 2012 10:09:54 -0800 (PST) Message-ID: <50D5F774.6070502@mu.org> Date: Sat, 22 Dec 2012 10:09:56 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Ed Maste Subject: Re: [PATCH] Add WITH_DEBUG_FILES knob to enable separate debug files References: <20121222164602.GB32022@sandvine.com> In-Reply-To: <20121222164602.GB32022@sandvine.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org 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: Sat, 22 Dec 2012 18:09:54 -0000 On 12/22/12 8:46 AM, Ed Maste wrote: > 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. > > The -g flag is automatically added to CFLAGS if debug files are enabled > (but the shared objects are still installed stripped, if DEBUG_FLAGS is > not set). > --- > This is a refinement of my earlier change for shared object standalone > debug. This patch also includes the following changes: > > - Change GDB's standalone debug file path to the default /usr/lib/debug. > > - Change debug file extension from 'symbols' to 'debug', in line with > GDB's documentation. I initially followed the kernel build example > in choosing .symbols, but .debug more accurately represents the use > of these files. > This looks promising. After this patch, running "gdb ./a.linked.with.libc.so.out" should work without any extra thinking? I'll give it a shot. We should enable this flag by default. A big FreeBSD strength is our debugging system. -Alfred