summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/FreeBSD/NativeThreadFreeBSD.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-07-01[lldb][FreeBSD][AArch64] Enable register field detection (#85058)David Spickett
This extends the existing register fields support from AArch64 Linux to AArch64 FreeBSD. So you will now see output like this: ``` (lldb) register read cpsr cpsr = 0x60000200 = (N = 0, Z = 1, C = 1, V = 0, DIT = 0, SS = 0, IL = 0, SSBS = 0, D = 1, A = 0, I = 0, F = 0, nRW = 0, EL = 0, SP = 0) ``` Linux and FreeBSD both have HWCAP/HWCAP2 so the detection mechanism is the same and I've renamed the detector class to reflect that. I have confirmed that FreeBSD's treatment of CPSR (spsr as the kernel calls it) is similair enough that we can use the same field information. (see `sys/arm64/include/armreg.h` and `PSR_SETTABLE_64`) For testing I've enabled the same live process test as Linux and added a shell test using an existing FreeBSD core file. Note that the latter does not need XML support because when reading a core file we are not sending the information via target.xml, it's just internal to LLDB.
2023-03-15Reland "[lldb] Refactor CrashReason"David Spickett
This reverts commit 71c4d186f1cf247f1aa45f4fd1b38f350b68d123. The reinterpret casts were not needed.
2023-03-15Revert "[lldb] Refactor CrashReason"David Spickett
This reverts commit af38530ee29c285f3827e33a41edf27c9c3a6767 due to a build failure on 32 bit.
2023-03-15[lldb] Refactor CrashReasonDavid Spickett
So that there is only one function that NativeThreads call, which takes a siginfo. Everything else is an internal detail. Reviewed By: labath, JDevlieghere Differential Revision: https://reviews.llvm.org/D146043
2022-06-21[lldb] [llgs] Fix signo sent with fork/vfork/vforkdone eventsMichał Górny
Fix ThreadStopInfo struct to include the signal number for all events. Since signo was not included in the details for fork, vfork and vforkdone stops, the code incidentally referenced the wrong union member, resulting in wrong signo being sent. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.llvm.org/D127193
2022-01-26[lldb] Convert POSIXLog to use the new APIPavel Labath
2022-01-13[lldb] [llgs] Implement qXfer:siginfo:readMichał Górny
Implement the qXfer:siginfo:read that is used to read the siginfo_t (extended signal information) for the current thread. This is currently implemented on FreeBSD and Linux. Differential Revision: https://reviews.llvm.org/D117113
2021-04-25[lldb] [Process/FreeBSD] Report fork/vfork events to LLGSMichał Górny
Differential Revision: https://reviews.llvm.org/D100547
2021-02-15[lldb] Rename FreeBSDRemote to FreeBSD (NFC)Michał Górny
Differential Revision: https://reviews.llvm.org/D96557