[Lldb-commits] [PATCH] D145377: [LLDB] Show sub type of faults for ELF core files
David Spickett via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 6 06:26:23 PST 2023
DavidSpickett created this revision.
Herald added subscribers: atanasyan, arichardson, sdardis, emaste.
Herald added a project: All.
DavidSpickett requested review of this revision.
Herald added projects: LLDB, LLVM.
Herald added subscribers: llvm-commits, lldb-commits.
Previously we only looked at the si_signo field, so you got:
(lldb) bt
* thread #1, name = 'a.out.mte', stop reason = signal SIGSEGV
* frame #0: 0x00000000004007f4
This patch adds si_code so we can show:
(lldb) bt
* thread #1, name = 'a.out.mte', stop reason = signal SIGSEGV: sync tag
check fault
* frame #0: 0x00000000004007f4
Core files (at least for Linux) don't contain the fault address,
so that argument to GetCrashReasonString is now optional.
(this is also the reason we can't do memory tag annotations)
Removed the assert from GetCrashReason because both existing uses
were already guarded and it let's me use it as a validity check.
This is mainly used for multi threaded core files where the thread
that stopped will have a valid signal number but the others will not.
The order of errno and code was incorrect in ElfLinuxSigInfo::Parse.
It was the order that a "swapped" siginfo arch would use, which for Linux,
is only MIPS. We removed MIPS Linux support some time ago.
See:
https://github.com/torvalds/linux/blob/fe15c26ee26efa11741a7b632e9f23b01aca4cc6/include/uapi/asm-generic/siginfo.h#L121
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D145377
Files:
lldb/source/Plugins/Process/POSIX/CrashReason.cpp
lldb/source/Plugins/Process/POSIX/CrashReason.h
lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
lldb/source/Plugins/Process/elf-core/ThreadElfCore.h
lldb/test/API/linux/aarch64/mte_core_file/TestAArch64LinuxMTEMemoryTagCoreFile.py
llvm/docs/ReleaseNotes.rst
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145377.502618.patch
Type: text/x-patch
Size: 7370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230306/d3bd5e38/attachment.bin>
More information about the lldb-commits
mailing list