Introduce a FreeBSDKernel plugin that provides the ability to read
FreeBSD kernel core dumps. The plugin utilizes libfbsdvmcore to provide
support for both "full memory dump" and minidump formats across variety
of architectures supported by FreeBSD. It provides the ability to read
kernel memory, as well as the crashed thread status with registers
on arm64, i386 and x86_64.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
@labath, I'm waiting for your feedback. I suspect you're going to hate it for being so incomplete (but then, we don't expect it to be able to do much more than this) but also love it for being so simple :-P.
Now with thread and register context classes, and hackish support for grabbing x86_64 registers.
@labath, do you think I should add another file in Process/Utility to abstract away structures used by the FreeBSD kernel in the same style that process plugins do?
Add arm64 support, simplify logic in ThreadFreeBSDKernel, handle unsupported architectures gracefully (instead of crashing).
I don't have a problem with incomplete patches. I (and llvm, in general) actually strongly incremental development.
I'm more interested in the testing story.
lldb/source/Plugins/Process/FreeBSDKernel/CMakeLists.txt | ||
---|---|---|
2 | external dependencies are dealt with in LLDBConfig.cmake |
Fix segv when there's no executable module. Move dependency check to LLDBConfig and use find_package()-style check. Add initial test files (still WIP).
Seems reasonable. I mean, there are a lot of things that are less than ideal, but none of this is substantially worse than what we have already, and you've done a pretty good job explaining what you've done.
external dependencies are dealt with in LLDBConfig.cmake