Skip to content

Commit 8877b91

Browse files
authored
[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.
1 parent f04bfbc commit 8877b91

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
#include "LinuxSignals.h"
1010

11-
#ifdef __linux__
11+
// mips-linux debugging is not supported and mips uses different numbers for
12+
// some signals (e.g. SIGBUS) on linux, so we skip the static checks below. The
13+
// definitions here can be used for debugging non-mips targets on a mips-hosted
14+
// lldb.
15+
#if defined(__linux__) && !defined(__mips__)
1216
#include <csignal>
1317

1418
#ifndef SEGV_BNDERR
@@ -33,7 +37,7 @@
3337
#else
3438
#define ADD_SIGCODE(signal_name, signal_value, code_name, code_value, ...) \
3539
AddSignalCode(signal_value, code_value, __VA_ARGS__)
36-
#endif /* ifdef __linux__ */
40+
#endif /* if defined(__linux__) && !defined(__mips__) */
3741

3842
using namespace lldb_private;
3943

0 commit comments

Comments
 (0)