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

via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 9 01:53:51 PDT 2025


Author: yingopq
Date: 2025-04-09T10:53:47+02:00
New Revision: 8877b913ae88c6ae43e859316489fe0469293131

URL: https://github.com/llvm/llvm-project/commit/8877b913ae88c6ae43e859316489fe0469293131
DIFF: https://github.com/llvm/llvm-project/commit/8877b913ae88c6ae43e859316489fe0469293131.diff

LOG: [LLDB][MIPS] Fix signal SIGBUS number mismatch error on mips target (#132688)

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.

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Utility/LinuxSignals.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
index eaecc84df15d4..9c4fe55147a28 100644
--- a/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
+++ b/lldb/source/Plugins/Process/Utility/LinuxSignals.cpp
@@ -8,7 +8,11 @@
 
 #include "LinuxSignals.h"
 
-#ifdef __linux__
+// mips-linux debugging is not supported and mips uses 
diff erent numbers for
+// some signals (e.g. SIGBUS) on linux, so we skip the static checks below. The
+// definitions here can be used for debugging non-mips targets on a mips-hosted
+// lldb.
+#if defined(__linux__) && !defined(__mips__)
 #include <csignal>
 
 #ifndef SEGV_BNDERR
@@ -33,7 +37,7 @@
 #else
 #define ADD_SIGCODE(signal_name, signal_value, code_name, code_value, ...)     \
   AddSignalCode(signal_value, code_value, __VA_ARGS__)
-#endif /* ifdef __linux__ */
+#endif /* if defined(__linux__) && !defined(__mips__) */
 
 using namespace lldb_private;
 


        


More information about the lldb-commits mailing list