https://github.com/Jlalond updated https://github.com/llvm/llvm-project/pull/144800
>From 157b5a5177784bc2ce4e8bf952c812aedd5be258 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde <jalalo...@fb.com> Date: Wed, 18 Jun 2025 14:35:37 -0700 Subject: [PATCH 1/2] Add SI_USER and SI_KERNEL to Linux signals --- lldb/source/Plugins/Process/Utility/LinuxSignals.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp index 15a77ce227ec5..4c49bde936965 100644 --- a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp +++ b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp @@ -65,6 +65,10 @@ // See siginfo.h in the Linux Kernel, these codes can be sent for any signal. #define ADD_LINUX_SIGNAL(signo, name, ...) \ AddSignal(signo, name, __VA_ARGS__); \ + ADD_SIGCODE(signo, signo, SI_USER, 0, "sent by kill, sigsend or raise", \ + SignalCodePrintOption::Sender); \ + ADD_SIGCODE(signo, signo, SI_KERNEL, 0x80, "sent by kernel", \ + SignalCodePrintOption::Sender); \ ADD_SIGCODE(signo, signo, SI_QUEUE, -1, "sent by sigqueue", \ SignalCodePrintOption::Sender); \ ADD_SIGCODE(signo, signo, SI_TIMER, -2, "sent by timer expiration", \ >From 8bf001190cb54b55575286e9cceb72cadbfdbf97 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde <jalalo...@fb.com> Date: Tue, 24 Jun 2025 09:39:00 -0700 Subject: [PATCH 2/2] Add SI_KERNEL into the description as well. --- lldb/source/Host/common/NativeProcessProtocol.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lldb/source/Host/common/NativeProcessProtocol.cpp b/lldb/source/Host/common/NativeProcessProtocol.cpp index 405acbb5662d6..33755e3e25d8a 100644 --- a/lldb/source/Host/common/NativeProcessProtocol.cpp +++ b/lldb/source/Host/common/NativeProcessProtocol.cpp @@ -340,6 +340,9 @@ void NativeProcessProtocol::NotifyDidExec() { Status NativeProcessProtocol::SetSoftwareBreakpoint(lldb::addr_t addr, uint32_t size_hint) { + + volatile bool debug = true; + while (debug) {} Log *log = GetLog(LLDBLog::Breakpoints); LLDB_LOG(log, "addr = {0:x}, size_hint = {1}", addr, size_hint); @@ -362,9 +365,10 @@ Status NativeProcessProtocol::RemoveSoftwareBreakpoint(lldb::addr_t addr) { auto it = m_software_breakpoints.find(addr); if (it == m_software_breakpoints.end()) return Status::FromErrorString("Breakpoint not found."); - assert(it->second.ref_count > 0); - if (--it->second.ref_count > 0) + if (it->second.ref_count > 0) { + --it->second.ref_count; return Status(); + } // This is the last reference. Let's remove the breakpoint. Status error; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits