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)
Wed, Jun 18, 3:03 AM
Unknown Object (File)
Wed, Jun 11, 11:37 PM
Unknown Object (File)
Wed, Jun 11, 8:01 AM
Unknown Object (File)
Sun, Jun 1, 12:03 PM
Unknown Object (File)
May 19 2025, 12:04 PM
Unknown Object (File)
May 18 2025, 4:01 AM
Unknown Object (File)
May 16 2025, 3:49 PM
Unknown Object (File)
May 12 2025, 5:30 PM
Subscribers

Details

Summary

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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

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

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.

73

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

81

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
47–48

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
47–48

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.