Merge pull request #89 from wmarti/pr-gdbstub-fix

[Debug] avoid signal macro clashes in GDB stub
This commit is contained in:
Heel
2026-02-04 20:26:06 +09:00
committed by GitHub
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -241,13 +241,13 @@ void GDBStub::Listen(GDBClient& client) {
cache_.cur_thread_id = cache_.notify_thread_id;
}
SignalCode signal = SignalCode::SIGTRAP;
SignalCode signal = SignalCode::kSIGTRAP;
if (cache_.notify_exception_code.has_value()) {
if (cache_.notify_exception_code ==
xe::Exception::Code::kIllegalInstruction) {
signal = SignalCode::SIGILL;
signal = SignalCode::kSIGILL;
} else {
signal = SignalCode::SIGSEGV;
signal = SignalCode::kSIGSEGV;
}
cache_.notify_exception_code.reset();
+1 -1
View File
@@ -35,7 +35,7 @@ class GDBStub : public cpu::DebugListener {
Interrupt = '\03',
};
enum class SignalCode : uint8_t { SIGILL = 4, SIGTRAP = 5, SIGSEGV = 11 };
enum class SignalCode : uint8_t { kSIGILL = 4, kSIGTRAP = 5, kSIGSEGV = 11 };
enum class RegisterIndex : int {
GPR0 = 0,