[all-commits] [llvm/llvm-project] 85bc49: [LLDB] Show sub type of signals when debugging a c...

David Spickett via All-commits all-commits at lists.llvm.org
Tue Mar 21 02:10:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 85bc498826d4dac4b64f7b02659f6ec52f11c223
      https://github.com/llvm/llvm-project/commit/85bc498826d4dac4b64f7b02659f6ec52f11c223
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2023-03-21 (Tue, 21 Mar 2023)

  Changed paths:
    M lldb/include/lldb/Target/StopInfo.h
    M lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
    M lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
    M lldb/source/Plugins/Process/elf-core/ThreadElfCore.h
    M lldb/source/Target/StopInfo.cpp
    M lldb/test/API/linux/aarch64/mte_core_file/TestAArch64LinuxMTEMemoryTagCoreFile.py
    M llvm/docs/ReleaseNotes.rst

  Log Message:
  -----------
  [LLDB] Show sub type of signals when debugging a core file

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.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D146045




More information about the All-commits mailing list