[Lldb-commits] [lldb] [LLDB][MIPS] Fix signal SIGBUS number mismatch error on mips target (PR #132688)

via lldb-commits lldb-commits at lists.llvm.org
Sun Mar 30 19:38:41 PDT 2025


https://github.com/yingopq updated https://github.com/llvm/llvm-project/pull/132688

>From 6b950401848296565f9aa988b6edceb5a1bbc2e1 Mon Sep 17 00:00:00 2001
From: Ying Huang <ying.huang at oss.cipunited.com>
Date: Mon, 24 Mar 2025 03:44:41 -0400
Subject: [PATCH] [LLDB][MIPS] Fix signal SIGBUS number mismatch error on mips
 target

Now, because we do not support mips debugging, if we compile LLVM
on mips target, would report error `static assertion failed:Value
mismatch for signal number SIGBUS`, so add this condition to avoid
error.
---
 lldb/source/Plugins/Process/Utility/LinuxSignals.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
index eaecc84df15d4..65184c9ee373a 100644
--- a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
+++ b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
@@ -8,7 +8,10 @@
 
 #include "LinuxSignals.h"
 
-#ifdef __linux__
+// Now, because we do not support mips debugging, if we compile LLVM on mips
+// target, would report error `static assertion failed:Value mismatch for signal
+// number SIGBUS`, so add this condition to avoid error.
+#if defined(__linux__) && !defined(__mips__)
 #include <csignal>
 
 #ifndef SEGV_BNDERR



More information about the lldb-commits mailing list