[Bug 283559] devel/gdb: kgdb should be able to load kld symbols from alternate location
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Dec 2024 16:50:22 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283559 Bug ID: 283559 Summary: devel/gdb: kgdb should be able to load kld symbols from alternate location Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: pizzamig@freebsd.org Reporter: asomers@FreeBSD.org Flags: maintainer-feedback?(pizzamig@freebsd.org) Assignee: pizzamig@freebsd.org A command like "kgdb /path/to/kernel vmcore.0" will use a an arbitrary kernel, not just the one that happens to be present in /boot. That's useful when examining old core dumps, or core dumps from panics that happened after an upgrade but before the subsequent reboot. If a kernel.debug file happens to be present in the same directory as the kernel, kgdb will use that too. However, I cannot find any way to specify an alternate location for kernel modules and their symbols files. If I copy the correct vmcore, kernel, kernel.debug, *.ko, and *.ko.debug files into a single directory, and then execute the above command, then kgdb will load the correct kernel but it will load the klds from /boot, wrongly. Like this: $ kgdb kernel vmcore.7 ... Reading symbols from kernel... Reading symbols from /usr/home/asomers/17-dec-crash-ces-1092/kernel.debug... ... Reading symbols from /boot/kernel/fusefs.ko... Reading symbols from /usr/lib/debug//boot/kernel/fusefs.ko.debug... Reading symbols from /boot/kernel/geom_multipath.ko... Reading symbols from /usr/lib/debug//boot/kernel/geom_multipath.ko.debug... ... As you can see in the above snippet, kgdb is loading the debug symbols for the running fusefs and geom_multipath modules. Instead, I need it to load them from the PWD. Alternatively, if there were an option to load both kernel and kld files from a BE or chroot, that would also solve the problem. -- You are receiving this mail because: You are the assignee for the bug.