Subject: Re: Enabling separate debug symbol support for gdb6
To: NetBSD Toolchain and Build Technical Discussion List <tech-toolchain@NetBSD.org>
From: Greg A. Woods <woods@weird.com>
List: tech-toolchain
Date: 07/23/2006 15:59:23
--pgp-sign-Multipart_Sun_Jul_23_15:59:21_2006-1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
At Sat, 22 Jul 2006 06:07:28 +1000,
matthew green wrote:
>=20
> a bunch of folks won't want to install the debug symbols. they're
> likely to be at least as large as the rest of the system. are you
> going to supply debug & non-debug versions of everything for binary
> installs?
That's actually not as difficult as one might think (assuming you mean
built with "-g" and without), though it does indeed require a bit more
storage on the build server, and a bit more build time too I suppose.
I'm doing it now with both the netbsd-1-6 and netbsd-3 branches, and
including xsrc on both, albiet only for three architectures. The trick
is to build everything with "-g", and then do a second install from the
same obj directory but using STRIPFLAG=3D'-sS -g'
(and for xsrc prior to /usr/src/x11: INSTPGMFLAGS=3D'-m 0755 -sS -g')
For example The i386 build, using "-static", and including the final ISO
for the "no-g" variant:
$ BLOCKSIZE=3D1m du -s /build/woods/always/netbsd-3*
<
4857 /build/woods/always/netbsd-3-i386-i386-ppro-obj
76 /build/woods/always/netbsd-3-i386-i386-tools
1990 /build/woods/always/netbsd-3-i386-ppro-destdir
1162 /build/woods/always/netbsd-3-i386-ppro-destdir-no-g
1 /build/woods/always/netbsd-3-i386-ppro-release
1370 /build/woods/always/netbsd-3-i386-ppro-release-no-g
(keep in mind that's a full static-linked userland)
> if not, what will people who don't want them do? eg, what
> use are they on a system i don't install the 'comp' set on normally?
Well personally I think gdb should be included in the 'base' set.
Debugging, and the ability to provide stack backtraces and basic
variable value printouts in particular, is a critical _operational_
issue for me.
As a developer too I've been desparate for over a decade to train users
to actually report stack backtraces _all_ of the time (unless _they_
already know what caused the crash).
I.e. a good symbolic debugger isn't a development tool, and one should
be available on _every_ system.
Furthermore I don't think the basic symbol table is an option on a
general-purpose system -- it must always be there. The only option for
me is whether '-g' symbols are there or not. I'd almost even say the
same rule should apply for embedded systems, though I can't speak very
directly to the current availability and cost of their system storage.
Now in an ideal world I would have the option to install the "-g"
symbols separately from the binaries but all binaries would still
include the basic symbols (i.e. they wouldn't be completely stripped).
> i can see the "gets out of sync" argument but i don't find it very
> compelling.
Well I think it's an important issue, but I can definitely see the
advantages of having the "-g" symbols in a separate file.
--=20
Greg A. Woods
H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com> Secrets of the Weird <woods@weird.com>
--pgp-sign-Multipart_Sun_Jul_23_15:59:21_2006-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: BuxaeZmb6GPmBN9soKNDI9vKJTuXIvay
iQA/AwUBRMPVGmJ7XxTCWceFEQIjDACfYVjLg8g1IVQGIcc3gYpKPZv8ED8AnjlR
TfmA8PLhWSvMb37ejCEUGHVl
=+ixB
-----END PGP SIGNATURE-----
--pgp-sign-Multipart_Sun_Jul_23_15:59:21_2006-1--