[PATCH] D146045: [LLDB] Show sub type of signals when debugging a core file

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 06:37:42 PDT 2023


DavidSpickett created this revision.
Herald added subscribers: atanasyan, arichardson, sdardis.
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

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

A test is added using memory tagging faults. Which were the original
motivation for the changes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146045

Files:
  lldb/include/lldb/Target/StopInfo.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/source/Target/StopInfo.cpp
  lldb/test/API/linux/aarch64/mte_core_file/TestAArch64LinuxMTEMemoryTagCoreFile.py
  llvm/docs/ReleaseNotes.rst

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146045.505075.patch
Type: text/x-patch
Size: 6909 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230314/bb173144/attachment.bin>


More information about the llvm-commits mailing list