GDBStub: remove the cmake option and the ifdefs
This commit is contained in:
parent
657bb00c01
commit
94a0f416eb
|
@ -59,7 +59,6 @@ option(ENCODE_FRAMEDUMPS "Encode framedumps in AVI format" ON)
|
|||
|
||||
option(ENABLE_GPROF "Enable gprof profiling (must be using Debug build)" OFF)
|
||||
option(FASTLOG "Enable all logs" OFF)
|
||||
option(GDBSTUB "Enable gdb stub for remote debugging." ON)
|
||||
option(OPROFILING "Enable profiling" OFF)
|
||||
|
||||
# TODO: Add DSPSpy
|
||||
|
@ -389,10 +388,6 @@ if(FASTLOG)
|
|||
add_definitions(-DDEBUGFAST)
|
||||
endif()
|
||||
|
||||
if(GDBSTUB)
|
||||
add_definitions(-DUSE_GDBSTUB)
|
||||
endif()
|
||||
|
||||
if(ENABLE_VTUNE)
|
||||
set(VTUNE_DIR "/opt/intel/vtune_amplifier")
|
||||
add_definitions(-DUSE_VTUNE)
|
||||
|
|
|
@ -452,6 +452,8 @@ add_library(core
|
|||
PowerPC/JitCommon/JitCache.h
|
||||
PowerPC/JitInterface.cpp
|
||||
PowerPC/JitInterface.h
|
||||
PowerPC/GDBStub.cpp
|
||||
PowerPC/GDBStub.h
|
||||
PowerPC/MMU.cpp
|
||||
PowerPC/MMU.h
|
||||
PowerPC/PowerPC.cpp
|
||||
|
@ -698,13 +700,6 @@ if(TARGET Hidapi::Hidapi)
|
|||
target_compile_definitions(core PRIVATE -DHAVE_HIDAPI=1)
|
||||
endif()
|
||||
|
||||
if(GDBSTUB)
|
||||
target_sources(core PRIVATE
|
||||
PowerPC/GDBStub.cpp
|
||||
PowerPC/GDBStub.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
target_sources(core PRIVATE
|
||||
MemoryWatcher.cpp
|
||||
|
|
|
@ -132,12 +132,10 @@ void SConfig::SaveGeneralSettings(IniFile& ini)
|
|||
|
||||
general->Set("WirelessMac", m_WirelessMac);
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
#ifndef _WIN32
|
||||
general->Set("GDBSocket", gdb_socket);
|
||||
#endif
|
||||
general->Set("GDBPort", iGDBPort);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SConfig::SaveInterfaceSettings(IniFile& ini)
|
||||
|
@ -371,12 +369,10 @@ void SConfig::LoadGeneralSettings(IniFile& ini)
|
|||
|
||||
general->Get("ShowLag", &m_ShowLag, false);
|
||||
general->Get("ShowFrameCount", &m_ShowFrameCount, false);
|
||||
#ifdef USE_GDBSTUB
|
||||
#ifndef _WIN32
|
||||
general->Get("GDBSocket", &gdb_socket, "");
|
||||
#endif
|
||||
general->Get("GDBPort", &(iGDBPort), -1);
|
||||
#endif
|
||||
|
||||
m_ISOFolder.clear();
|
||||
int numISOPaths;
|
||||
|
@ -733,11 +729,9 @@ void SConfig::LoadDefaults()
|
|||
bAutomaticStart = false;
|
||||
bBootToPause = false;
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
iGDBPort = -1;
|
||||
#ifndef _WIN32
|
||||
gdb_socket = "";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
cpu_core = PowerPC::DefaultCPUCore();
|
||||
|
|
|
@ -79,11 +79,9 @@ struct SConfig
|
|||
|
||||
// Settings
|
||||
bool bEnableDebugging = false;
|
||||
#ifdef USE_GDBSTUB
|
||||
int iGDBPort;
|
||||
#ifndef _WIN32
|
||||
std::string gdb_socket;
|
||||
#endif
|
||||
#endif
|
||||
bool bAutomaticStart = false;
|
||||
bool bBootToPause = false;
|
||||
|
|
|
@ -62,15 +62,12 @@
|
|||
#include "Core/NetPlayClient.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
#include "Core/PatchEngine.h"
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#include "Core/PowerPC/JitInterface.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
#include "Core/State.h"
|
||||
#include "Core/WiiRoot.h"
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_MEMORYWATCHER
|
||||
#include "Core/MemoryWatcher.h"
|
||||
#endif
|
||||
|
@ -380,7 +377,6 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
|
|||
{
|
||||
CPUSetInitialExecutionState();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Enter CPU run loop. When we leave it - we are done.
|
||||
CPU::Run();
|
||||
|
@ -394,14 +390,12 @@ static void CpuThread(const std::optional<std::string>& savestate_path, bool del
|
|||
if (_CoreParameter.bFastmem)
|
||||
EMM::UninstallExceptionHandler();
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
if (gdb_active())
|
||||
{
|
||||
gdb_deinit();
|
||||
INFO_LOG_FMT(GDB_STUB, "Killed by CPU shutdown");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void FifoPlayerThread(const std::optional<std::string>& savestate_path,
|
||||
|
@ -662,11 +656,9 @@ static void EmuThread(std::unique_ptr<BootParameters> boot, WindowSystemInfo wsi
|
|||
cpuThreadFunc(savestate_path, delete_savestate);
|
||||
}
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
INFO_LOG_FMT(CONSOLE, "{}", StopMessage(true, "Stopping GDB ..."));
|
||||
gdb_deinit();
|
||||
INFO_LOG_FMT(CONSOLE, "{}", StopMessage(true, "GDB stopped."));
|
||||
#endif
|
||||
}
|
||||
|
||||
// Set or get the running state
|
||||
|
|
|
@ -12,13 +12,10 @@
|
|||
#include "Common/Event.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
#include "VideoCommon/Fifo.h"
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#endif
|
||||
|
||||
namespace CPU
|
||||
{
|
||||
// CPU Thread execution state.
|
||||
|
@ -135,7 +132,6 @@ void Run()
|
|||
// Wait for step command.
|
||||
s_state_cpu_cvar.wait(state_lock, [&state_lock] {
|
||||
ExecutePendingJobs(state_lock);
|
||||
#ifdef USE_GDBSTUB
|
||||
state_lock.unlock();
|
||||
if (gdb_active() && gdb_hasControl())
|
||||
{
|
||||
|
@ -146,7 +142,6 @@ void Run()
|
|||
s_state_cpu_step_instruction = true;
|
||||
}
|
||||
state_lock.lock();
|
||||
#endif
|
||||
return s_state_cpu_step_instruction || !IsStepping();
|
||||
});
|
||||
if (!IsStepping())
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
#include "Common/CommonTypes.h"
|
||||
#include "Core/CoreTiming.h"
|
||||
|
||||
#ifndef MSG_WAITALL
|
||||
#define MSG_WAITALL (8)
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GDB_SIGTRAP = 5,
|
||||
|
|
|
@ -20,15 +20,12 @@
|
|||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HW/CPU.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#include "Core/PowerPC/Interpreter/ExceptionUtils.h"
|
||||
#include "Core/PowerPC/MMU.h"
|
||||
#include "Core/PowerPC/PPCTables.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
u32 last_pc;
|
||||
|
@ -296,9 +293,8 @@ void Interpreter::Run()
|
|||
#endif
|
||||
INFO_LOG_FMT(POWERPC, "Hit Breakpoint - {:08x}", PC);
|
||||
CPU::Break();
|
||||
#ifdef USE_GDBSTUB
|
||||
gdb_takeControl();
|
||||
#endif
|
||||
if (gdb_active())
|
||||
gdb_takeControl();
|
||||
if (PowerPC::breakpoints.IsTempBreakPoint(PC))
|
||||
PowerPC::breakpoints.Remove(PC);
|
||||
|
||||
|
|
|
@ -19,15 +19,12 @@
|
|||
#include "Core/HW/MMIO.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/HW/ProcessorInterface.h"
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#include "Core/PowerPC/JitInterface.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
|
||||
#include "VideoCommon/VideoBackendBase.h"
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#endif
|
||||
|
||||
namespace PowerPC
|
||||
{
|
||||
// EFB RE
|
||||
|
@ -522,9 +519,8 @@ static void Memcheck(u32 address, u64 var, bool write, size_t size)
|
|||
|
||||
CPU::Break();
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
gdb_takeControl();
|
||||
#endif
|
||||
if (gdb_active())
|
||||
gdb_takeControl();
|
||||
|
||||
// Fake a DSI so that all the code that tests for it in order to skip
|
||||
// the rest of the instruction will apply. (This means that
|
||||
|
|
|
@ -25,15 +25,12 @@
|
|||
#include "Core/HW/SystemTimers.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/PowerPC/CPUCoreBase.h"
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#include "Core/PowerPC/Interpreter/Interpreter.h"
|
||||
#include "Core/PowerPC/JitInterface.h"
|
||||
#include "Core/PowerPC/MMU.h"
|
||||
#include "Core/PowerPC/PPCSymbolDB.h"
|
||||
|
||||
#ifdef USE_GDBSTUB
|
||||
#include "Core/PowerPC/GDBStub.h"
|
||||
#endif
|
||||
|
||||
namespace PowerPC
|
||||
{
|
||||
// STATE_TO_SAVE
|
||||
|
@ -617,9 +614,8 @@ void CheckBreakPoints()
|
|||
if (PowerPC::breakpoints.IsBreakPointBreakOnHit(PC))
|
||||
{
|
||||
CPU::Break();
|
||||
#ifdef USE_GDBSTUB
|
||||
gdb_takeControl();
|
||||
#endif
|
||||
if (gdb_active())
|
||||
gdb_takeControl();
|
||||
}
|
||||
if (PowerPC::breakpoints.IsBreakPointLogOnHit(PC))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue