Subject: Re: Building with debug symbols
To: Lubomir Kundrak <firstname.lastname@example.org>
From: Andreas Gustafsson <email@example.com>
Date: 03/19/2007 19:36:56
Lubomir Kundrak wrote:
> > What is the correct way to build NetBSD-current with debug symbols?
> > Is "build.sh -V DBG=-g release" supposed to work?
> Maybe it is. Try yourself.
By trying it myself I will only find out whether it works or not, not
whether it is _supposed_ to work or not.
As a matter of fact I have already tried it and found that it doesn't
work. The question is, is this a bug in NetBSD that I should file
a PR about, or am I using the wrong method?
> I used to build with COPTS=-g, now I use
> separate debugging packages with debugging symbols that you can enable
> with MKDEBUG=Yes.
I tried this ("build.sh -V MKDEBUG=Yes release"). The build completed
successfully (including the boot floppies), I was able to install the
resulting release, and the /usr/libdata/debug directory was populated
with .debug files. But how do I make gdb use them? I tried
gdb --symbols /usr/libdata/debug/bin/sh.debug /bin/sh
but gdb still said "no debugging symbols found".
Andreas Gustafsson, firstname.lastname@example.org