Subject: RE: CFLAGS
To: David Laight <firstname.lastname@example.org>
From: Martin Fouts <email@example.com>
Date: 11/12/2007 08:30:32
> -----Original Message-----
> From: tech-kern-owner@NetBSD.org=20
> [mailto:tech-kern-owner@NetBSD.org] On Behalf Of David Laight
> Sent: Saturday, November 10, 2007 6:49 AM
> To: Steven M. Bellovin
> Cc: Matthias Scheler; tech-kern@NetBSD.org
> Subject: Re: CFLAGS
> On Fri, Nov 09, 2007 at 03:57:58PM +0000, Steven M. Bellovin wrote:
> > On Fri, 9 Nov 2007 14:16:19 +0000
> > Matthias Scheler <firstname.lastname@example.org> wrote:
> > > On Thu, Nov 08, 2007 at 08:21:00PM +0100, Pavel Cahyna wrote:
> > > > > And use the following kernel config option, if you want the=20
> > > > > debug
> > > > > information:
> > > > > makeoptions DEBUG=3D"-g"
> > > >=20
> > > > ... which creates a big netbsd.gdb with debugging=20
> information and=20
> > > > a small netbsd without them.
> > >=20
> > > Don't forget keep the "netbsd.gdb" around which will be=20
> very handy=20
> > > when having a look at a kernel crash dump later.
> > >=20
> > Perhaps 'make install' in the kernel build directory should=20
> copy both=20
> > /netbsd and /netbsd.gdb to /, and savecore should copy both to=20
> > /var/crash.
> Which actually bets the question of the sanity of having two files.
> (Yes, you may want to strip some non-loadable info for small=20
> systems, but in general you don't need to worry that much.)
I cannot argue the general case, but I live in the special case where
having two files is very useful.
In the embedded world, we cross compile, load kernel images onto devices
using relatively slow interfaces, are space constrained, have to update
huge numbers of devices over the air when we ship an upgrade and are big
fans of remote debugging.
For us the two file model is nearly perfect for the work flow. Perfect
would be to change tools so that they only uploaded the executable bits,
but we often work with tools provided by silicon vendors and don't have
the luxury of being able to change them.