Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 May 2015 11:02:57 -0700
From:      Sean Bruno <sbruno@ignoranthack.me>
To:        freebsd-hackers@freebsd.org
Subject:   Re: How to get anything useful out of kgdb?
Message-ID:  <554E4BD1.1030802@ignoranthack.me>
In-Reply-To: <554E41EE.2010202@ignoranthack.me>
References:  <554E41EE.2010202@ignoranthack.me>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 05/09/15 10:20, Sean Bruno wrote:
> 
> tl;dr  What are the kernel config options to get good output of
> kgdb?
> 
> 
> I'm trying to get the ability to debug and display internal
> variables, as one does, with kgdb.  I'm *must* be doing this wrong
> as I cannot get any useful output from accessing variables that
> were JUST accessed in order to invoke a panic() that I have
> inserted.  This is a GENERIC kernel without INVARIANTS and without
> WITNESS:
> 
> https://people.freebsd.org/~sbruno/wtf_kgdb.txt
> 
> I seem to have debug enabled and am able to browse source, but I 
> obviously haven't compiled correctly as things are optimized out.
> 

Just to see what the arguments to make are when building, I touched
if_em.c and did a NOCLEAN rebuild.

What I see is this:
https://people.freebsd.org/~sbruno/wtf_make.txt

Should -02 and -g do anything useful here when compiling?  Do I need
to drop the optimization flags?

sean
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQF8BAEBCgBmBQJVTkvOXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx
MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k1noIAKfpfYVyhMDpCGPl97to81F+
URoq0Clm+Ptw2eIq89g8HNqy6k958PSOyL7SgPjYRTlu96DixkOm3YOPBaH/iWe4
B5SaZGeMwM6gVpyPXp3SkO0+QcDLsj5mlx15QQFCKH9X60J/BhWDzsfXj+84IJDD
2DDsv9ZPhVRnNzzJ2XLNwo8H10+IG/lXUvCIFRDLALKYOgLd+Oy/BKJ2ddhgrVvm
y0utNy7N0G3edKKvbXZ8O/HsSecSfM0ttHIpXVJrZp05JxxSJ7WttZzQB8HSe8si
niEjSrp4zBsUMM139DzKZWIHEFNBAUx+pxLyxOHOXtRcVzuSC+IcrvErwI2Lg28=
=DMDN
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?554E4BD1.1030802>