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
F81417948: D33817.id132796.diff
Tue, Apr 16, 1:13 AM
F81417897: D33817.id.diff
Tue, Apr 16, 1:11 AM
F81414995: D33817.diff
Tue, Apr 16, 12:22 AM
Unknown Object (File)
Fri, Apr 12, 7:29 AM
Unknown Object (File)
Thu, Apr 11, 11:51 PM
Unknown Object (File)
Feb 26 2024, 10:26 PM
Unknown Object (File)
Feb 15 2024, 11:52 AM
Unknown Object (File)
Jan 28 2024, 10:18 AM
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.