summaryrefslogtreecommitdiff
path: root/lldb/test/Shell/Register/Core
AgeCommit message (Collapse)Author
2025-05-30[LLDB][Platform Linux] Flip uid and pid in get signal description (#142200)Jacob Lalonde
Despite a great review from @labath, I accidentally landed the signal with the UID and PID properties flipped. I was actually trying to write tests for this feature when I discovered it. This fixes that bug, and add a shell test that runs only on Nix systems.
2025-01-23[lldb] Enable "frame diagnose" on linux (#123217)Pavel Labath
.. by changing the signal stop reason format :facepalm: The reason this did not work is because the code in `StopInfo::GetCrashingDereference` was looking for the string "address=" to extract the address of the crash. Macos stop reason strings have the form ``` EXC_BAD_ACCESS (code=1, address=0xdead) ``` while on linux they look like: ``` signal SIGSEGV: address not mapped to object (fault address: 0xdead) ``` Extracting the address from a string sounds like a bad idea, but I suppose there's some value in using a consistent format across platforms, so this patch changes the signal format to use the equals sign as well. All of the diagnose tests pass except one, which appears to fail due to something similar #115453 (disassembler reports unrelocated call targets). I've left the tests disabled on windows, as the stop reason reporting code works very differently there, and I suspect it won't work out of the box. If I'm wrong -- the XFAIL will let us know.
2024-11-21[LLDB][ProcessELFCore] Add Description to ProcessELFCore/ELFThread stop ↵Jacob Lalonde
reasons (#110065) This fixes a functionality gap with GDB, where GDB will properly decode the stop reason and give the address for SIGSEGV. I also added descriptions to all stop reasons, following the same code path that the Native Linux Thread uses.
2024-07-03[lldb][AArch64] Add register field enum information (#96887)David Spickett
This enables XML output for enums and adds enums for 2 fields on AArch64 Linux: * mte_ctrl.tcf, which controls how tag faults are delivered. * fpcr.rmode, which sets the rounding mode for floating point operations. The other one we could do is cpsr.btype, but it is not clear what would be useful here so I'm not including it in this change.
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-05-25[NFC][Py Reformat] Reformat python files in lldbJonas Devlieghere
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
2021-09-09[lldb] [test] Add tests for coredumps with multiple threadsMichał Górny
Differential Revision: https://reviews.llvm.org/D101157
2021-06-20[lldb] [Process/elf-core] Fix reading NetBSD/i386 core dumpsMichał Górny
Add support for extracting basic data from NetBSD/i386 core dumps. FPU registers are not supported at the moment. Differential Revision: https://reviews.llvm.org/D101091
2021-05-12[lldb] [Process/elf-core] Fix reading FPRs from FreeBSD/i386 coresMichał Górny
The FreeBSD coredumps from i386 systems contain only FSAVE-style NT_FPREGSET. Since we do not really support reading that kind of data anymore, just use NT_X86_XSTATE to get FXSAVE-style data when available. Differential Revision: https://reviews.llvm.org/D101086
2021-04-21[lldb] [test/Register] Initial tests for regsets in core dumpsMichał Górny
Add initial tests for reading register sets from core dumps. This includes a C++ program to write registers and dump core, resulting core dumps for Linux, FreeBSD and NetBSD, and the tests to verify them. The tests are split into generic part, verifying user-specified register values, and coredump-specific tests that verify memory addresses that differ for every dump. At this moment, all platforms support GPRs and FPRs up to XMM for amd64 target. The i386 target does not work on NetBSD at all, and is missing FPRs entirely on FreeBSD. Differential Revision: https://reviews.llvm.org/D91963