Page MenuHomeFreeBSD

crashinfo: Source a list of python scripts into kgdb
ClosedPublic

Authored by markj on Jan 11 2022, 2:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 2:09 PM
Unknown Object (File)
Mon, Nov 4, 6:16 PM
Unknown Object (File)
Wed, Oct 23, 3:25 PM
Unknown Object (File)
Oct 14 2024, 12:49 PM
Unknown Object (File)
Oct 14 2024, 12:49 PM
Unknown Object (File)
Oct 14 2024, 12:49 PM
Unknown Object (File)
Sep 27 2024, 4:53 AM
Unknown Object (File)
Sep 23 2024, 6:25 PM
Subscribers

Details

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jan 11 2022, 2:41 AM
avg added a subscriber: avg.

LGTM!
At work we have an extension that allows to dump (and save) both a text dump and a vmcore at the same time.
We use that to easily capture from ddb things that are hard (but not impossible) to get with kgdb.
The path you open here is a great alternative to that.

This revision is now accepted and ready to land.Jan 11 2022, 7:33 AM

That's kind of neat. Note that there may be some ways to get kgdb to auto-load python scripts if you install them in the right path the way the scripts to create pretty-printers for libc++ works now. It may be worth looking at that at some point. That is, you would perhaps install a python script to /boot/kernel/kernel.py (or whatever gdb wants it called) during installkernel and then gdb (and kgdb) would auto-load it.

Note that you could store the "real" scripts in /usr/libexec/kgdb or the like and have the kernel-gdb.py just be a small script that loads the common ones.