Date: Sat, 09 May 2015 11:30:59 -0700 From: Sean Bruno <sbruno@ignoranthack.me> To: Jeff Meegan <jeffm@frob.org> Cc: freebsd-hackers@freebsd.org Subject: Re: How to get anything useful out of kgdb? Message-ID: <554E5263.8010205@ignoranthack.me> In-Reply-To: <406EAA27-D825-408B-985E-DC3FFE746473@frob.org> References: <554E41EE.2010202@ignoranthack.me> <554E4BD1.1030802@ignoranthack.me> <406EAA27-D825-408B-985E-DC3FFE746473@frob.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/09/15 11:09, Jeff Meegan wrote: > You could try -O0, but also if you just care about txr, go up to > frame 12 where txr initialized to the context arg to em_handle_tx() > and print it out there. > > —j I'm guessing that the place to change -O2 -> -O0 is in kern.pre.mk ? sean > >> On May 9, 2015, at 11:02 AM, Sean Bruno <sbruno@ignoranthack.me> >> wrote: >> > 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 >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To >> unsubscribe, send any mail to >> "freebsd-hackers-unsubscribe@freebsd.org" > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVTlJgXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kbQQH/A2nlC6kEar9xZfslOKE9BjA Y5MJZiFyo9/X9E7dpVyn02h4MKgiCdfxzVVSVoHQEvoNcjpsDLdp5MvAs5KUv4VZ 1FHJILDeBuDlMG4HFCv3hqvVShsXxog4ausDrk3F+3MK8ochwQu5NkF5M59rlWtk QGIJp2svibiqfTL/DcsJM+7o/9HxHoThh0skKIpY9LQ+4sYFK8uTAFZX5DcchXo1 M24lMKPKKymnRAt+FenkEzdKQyNHdszNWl4EptEDHe0G+nG/TRZZMBnmuID6tqt7 mI8hwpnf4Q04yt3C/CrYh33E0GQ8WrnWCMYnTUH4lMUGl/o2VFNGfF23CrLidTw= =jlHy -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?554E5263.8010205>