summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp
AgeCommit message (Collapse)Author
2024-08-27[lldb] Turn lldb_private::Status into a value type. (#106163)Adrian Prantl
This patch removes all of the Set.* methods from Status. This cleanup is part of a series of patches that make it harder use the anti-pattern of keeping a long-lives Status object around and updating it while dropping any errors it contains on the floor. This patch is largely NFC, the more interesting next steps this enables is to: 1. remove Status.Clear() 2. assert that Status::operator=() never overwrites an error 3. remove Status::operator=() Note that step (2) will bring 90% of the benefits for users, and step (3) will dramatically clean up the error handling code in various places. In the end my goal is to convert all APIs that are of the form ` ResultTy DoFoo(Status& error) ` to ` llvm::Expected<ResultTy> DoFoo() ` How to read this patch? The interesting changes are in Status.h and Status.cpp, all other changes are mostly ` perl -pi -e 's/\.SetErrorString/ = Status::FromErrorString/g' $(git grep -l SetErrorString lldb/source) ` plus the occasional manual cleanup.
2024-02-10[lldb] Fix FreeBSD build. (#81353)David CARLIER
2024-02-05Add a new SBProcess:: GetCoreFile() API (#80767)jeffreytan81
We have a Python script that needs to locate coredump path during debugging so that we can retrieve certain metadata files associated with it. Currently, there is no API for this. This patch adds a new `SBProcess::GetCoreFile()` to retrieve target dump file spec used for dump debugging. Note: this is different from the main executable module spec. To achieve this, the patch hoists m_core_file into PostMortemProcess for sharing. --------- Co-authored-by: jeffreytan81 <jeffreytan@fb.com>
2023-10-03[lldb][FreeBSD] Add dynamic loader handle class for FreeBSD Kernel (#67106)aokblast
The implemtation support parsing kernel module for FreeBSD Kernel and has been test on x86-64 and arm64. In summary, this class parse the linked list resides in the kernel memory that record all kernel module and load the debug symbol file to facilitate debug process
2022-01-06[lldb] [Process/FreeBSDKernel] Support finding all processesMichał Górny
Include the complete list of threads of all running processes in the FreeBSDKernel plugin. This makes it possible to inspect the states (including partial register dumps from PCB) of all kernel and userspace threads at the time of crash, or at the time of reading /dev/mem first. Differential Revision: https://reviews.llvm.org/D116255
2021-12-22[lldb] [Process/FreeBSDKernel] Introduce libkvm supportMichał Górny
Introduce initial support for using libkvm on FreeBSD. The library can be used as an alternate implementation for processing kernel coredumps but it can also be used to access live kernel memory through specifying "/dev/mem" as the core file, i.e.: lldb --core /dev/mem /boot/kernel/kernel Differential Revision: https://reviews.llvm.org/D116005
2021-12-14[lldb] Introduce a FreeBSDKernel plugin for vmcoresMichał Górny
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. Differential Revision: https://reviews.llvm.org/D114911
2021-12-14Revert "[lldb] Introduce a FreeBSDKernel plugin for vmcores"Michał Górny
This reverts commit aedb328a4dc9cb48ee3cf3198281649ea2c4f532. I have failed to make the new tests conditional to the presence of libfbsdvmcore.
2021-12-14[lldb] Introduce a FreeBSDKernel plugin for vmcoresMichał Górny
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. Differential Revision: https://reviews.llvm.org/D114911