Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Getting full debug symbol table?



On Sun, May 18, 2014 at 07:57:22PM -0700, Matt Thomas wrote:
> 
> On May 18, 2014, at 6:49 PM, Paul Goyette <paul%whooppee.com@localhost> wrote:
> 
> > I vaguely remember some discussion on this recently, but can't seem to find 
> > it...
> > 
> > Has there been some changes that cause
> > 
> >     makeoptions     DEBUG="-g"      # compile full symbol table
> > 
> > (in kernel configuration file) to no longer work?
> > 
> > Is there some new magic incantation needed to get the netbsd.gdb file that 
> > used to be produced via the above makeoption?
> 
> MKKDEBUG=yes
> 
> or config -g

Actually the latter only prints a hint how to do it ;-)

But the issue is more complex:

 1) makeoptions DEBUG="-g"  in config files still works, if you build your
    kernel manually. However, it is disabled in "build.sh release" (and
    friends).

 2) you can build a netbsd.gdb for arbitrary kernels w/o touching the config
    file by "build.sh kernel.gdb=conf"

 3) you can force all your local builds to generate netbsd.gdb kernels
    (overriding the "build.sh release" part of (1) above) by adding
    MKKDEBUG=yes to /etc/mk.conf

 4) you can force setting of DEBUG=-g in the generated makefile (without
    touching the config file) by running: config -D DEBUG="-g" myconf

We should probably put this somewhere on the wiki, everybody please feel free
to properly document it. Same place should document MKDEBUG=yes and
MKDEBUGLIB=yes for userland.

Martin


Home | Main Index | Thread Index | Old Index