Page MenuHomeFreeBSD

crashinfo: remove gdb 6.1 leftovers
ClosedPublic

Authored by emaste on Mar 8 2022, 12:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 27, 1:28 PM
Unknown Object (File)
Thu, Jun 27, 10:56 AM
Unknown Object (File)
May 27 2024, 2:27 AM
Unknown Object (File)
May 12 2024, 6:46 PM
Unknown Object (File)
Mar 9 2024, 4:09 PM
Unknown Object (File)
Mar 9 2024, 4:09 PM
Unknown Object (File)
Mar 9 2024, 4:09 PM
Unknown Object (File)
Mar 9 2024, 3:59 PM
Subscribers

Details

Summary

We no longer provide gdb 6.1 in /usr/libexec, so don't check for it in crashinfo.

Diff Detail

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

Event Timeline

emaste created this revision.
usr.sbin/crashinfo/crashinfo.sh
46–47

I left this as is for now, as we may want to check for multiple gdbs in the future again. We could just remove this completely.

72

this is a workaround for obsolete gdb and presumably will never be needed again

80

With lldb main we can do lldb --batch -o 'p version' /boot/kernel/kernel -c /var/crash/vmcore.0

lldb prints all 256 chars of version though, (char[256]) $0 = "FreeBSD 14.0-CURRENT #4....\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..."

Aside, I wonder if it would be possible to extend lldb's emulator?

(lldb) expr printf("%s", version)
error: expression failed to parse:
error: Can't evaluate the expression without a running target due to: Interpreter doesn't handle one of the expression's opcodes
usr.sbin/crashinfo/crashinfo.sh
46–47

We can probably remove it completely. However, we might need a different set of abstractions in the future for lldb vs gdb (e.g. a helper function to fetch the version string).

usr.sbin/crashinfo/crashinfo.sh
46–47

Yes, whatever we do to support lldb will probably be quite different.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 5 2023, 1:55 AM
This revision was automatically updated to reflect the committed changes.