================
@@ -61,10 +61,17 @@ void LinuxSignals::Reset() {
AddSignal(5, "SIGTRAP", true, true, true, "trace trap (not
reset when caught)");
AddSignal(6, "SIGABRT", false, true, true, "abort()/IOT
trap", "SIGIOT");
- AddSignal(7, "SIGBUS", false, true, true, "bus error");
- ADD_SIGCODE(SIGBUS, 7, BUS_ADRALN, 1, "illegal alignment");
- ADD_SIGCODE(SIGBUS, 7, BUS_ADRERR, 2, "illegal address");
- ADD_SIGCODE(SIGBUS, 7, BUS_OBJERR, 3, "hardware error");
+#if defined(mips) || defined(__mips__) || defined(__mips)
+ AddSignal(10, "SIGBUS", false, true, true, "bus error");
+ ADD_SIGCODE(SIGBUS, 10, BUS_ADRALN, 1, "illegal alignment");
+ ADD_SIGCODE(SIGBUS, 10, BUS_ADRERR, 2, "illegal address");
+ ADD_SIGCODE(SIGBUS, 10, BUS_OBJERR, 3, "hardware error");
+#else
+ AddSignal(7, "SIGBUS", false, true, true, "bus error");
+ ADD_SIGCODE(SIGBUS, 7, BUS_ADRALN, 1, "illegal alignment");
+ ADD_SIGCODE(SIGBUS, 7, BUS_ADRERR, 2, "illegal address");
+ ADD_SIGCODE(SIGBUS, 7, BUS_OBJERR, 3, "hardware error");
+#endif
----------------
DavidSpickett wrote:
I suspect that this code is also used in the `lldb` client, which may be built
on a platform other than the target platform. For example, I can debug MIPS
Linux remotely from a Mac OS host. It will need to be a runtime check in this
case, and the compile time checks relaxed.
If this code only ever runs in lldb-server, then it could be fine.
https://github.com/llvm/llvm-project/pull/132688
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits