Subject: Re: MKDEBUGLIB builds broken (again)
To: Jachym Holecek <freza@dspfpga.com>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-toolchain
Date: 03/28/2007 17:21:42
--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 28, 2007 at 01:16:41PM +0200, Jachym Holecek wrote:
> # Quentin Garnier 2007-03-28:
> > On Wed, Mar 28, 2007 at 12:13:17PM +0200, Jachym Holecek wrote:
> > > doing "build.sh distribution" with "MKDEBUGLIB=3Dyes" fails in checkf=
list
> > > as follows b/c the debug libraries are installed but not listed under
> > > distrib/sets. What's the right way to fix this?
> > >=20
> > >   1. Make <bsd.lib.mk> not install ${lib}_g.a.
> > >=20
> > >   2. Teach distribution sets about debug libraries.
> > >=20
> > > I think (2) is right, but wanted to make sure before I do something.
> >=20
> > We're long due a debug set.  This could be the occasion to start it.
>=20
> I can give it an evening or two... Would there be something besides
> debuglibs to include?

Yes.

gdb is gaining (gained?) the ability to cope with debug symbols that=20
aren't in the actual program. I believe this came with DWARF debugging. Or=
=20
may come, depending on if we've flipped the switch.

The upshot is that we can build all applications as debug (gcc -g). Then=20
after we build the binary in the obj dir, we strip while installing. We=20
then also do something (I admit not knowing what) that splits out the=20
debugging symbols to a dSYM file.

It's kinda like stripping the binary, but instead of removing debug info,=
=20
we leave only debug info.

We then install the debug info. I _think_ we install it next to the=20
program, but I'm not sure what all the typical behaviors are.

The debug info then is in the debug set. We may want one debug set per=20
normal set.

A cool consequence of this is that we could then generate cores from=20
production systems (boxes running stripped binaries) and still debug them=
=20
with symbols. Just grab the corresponding debug sets for the symbols.

Take care,

Bill

--G4iJoqBmSsgzjUCe
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFGCxSmWz+3JHUci9cRAi8jAJ0YcCqECE2NctC0PXKdYAFpTI4CjQCglS49
AqA+4VHYWOAGk90C0lt7GME=
=45Lt
-----END PGP SIGNATURE-----

--G4iJoqBmSsgzjUCe--