From 26a9ab5b199a3e82064f52a1f8f59e628ea9c3aa Mon Sep 17 00:00:00 2001 From: PoroCYon Date: Fri, 10 Aug 2018 16:02:31 +0200 Subject: [PATCH] Use GDB_SIG* enum instead of the system's macros, as the latter mightn't be included or might have a different value. --- Source/Core/Core/PowerPC/GDBStub.cpp | 2 +- Source/Core/Core/PowerPC/GDBStub.h | 11 +++++++---- Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/PowerPC/GDBStub.cpp b/Source/Core/Core/PowerPC/GDBStub.cpp index 9d17362ec8..af203cb63d 100644 --- a/Source/Core/Core/PowerPC/GDBStub.cpp +++ b/Source/Core/Core/PowerPC/GDBStub.cpp @@ -252,7 +252,7 @@ static void gdb_read_command() else if (c == 0x03) { CPU::Break(); - gdb_signal(SIGTRAP); + gdb_signal(GDB_SIGTRAP); return; } else if (c != GDB_STUB_START) diff --git a/Source/Core/Core/PowerPC/GDBStub.h b/Source/Core/Core/PowerPC/GDBStub.h index 905841f4d1..b09648b2ff 100644 --- a/Source/Core/Core/PowerPC/GDBStub.h +++ b/Source/Core/Core/PowerPC/GDBStub.h @@ -8,12 +8,15 @@ #include "Common/CommonTypes.h" -#ifdef _WIN32 -#define SIGTRAP 5 -#define SIGTERM 15 -#define MSG_WAITALL 8 +#if defined(_WIN32) || !defined(MSG_WAITALL) +#define MSG_WAITALL (8) #endif +typedef enum { + GDB_SIGTRAP = 5, + GDB_SIGTERM = 15, +} gdb_signals; + typedef enum { GDB_BP_TYPE_NONE = 0, GDB_BP_TYPE_X, diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp index 3e6ec2aa9e..0c1b76215d 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp @@ -117,7 +117,7 @@ int Interpreter::SingleStepInner() { Host_UpdateDisasmDialog(); - gdb_signal(SIGTRAP); + gdb_signal(GDB_SIGTRAP); gdb_handle_exception(); } #endif