diff options
| author | 2016-12-15 16:19:30 -0500 | |
|---|---|---|
| committer | 2016-12-15 16:37:22 -0500 | |
| commit | ba20dd9b6125551ecf2016ed7dbd61dc618fc876 (patch) | |
| tree | 339289e4a87660df3edf1d3263ecb0e22ca2b573 /src/core/arm | |
| parent | Merge pull request #2330 from lioncash/pragma (diff) | |
| download | yuzu-ba20dd9b6125551ecf2016ed7dbd61dc618fc876.tar.gz yuzu-ba20dd9b6125551ecf2016ed7dbd61dc618fc876.tar.xz yuzu-ba20dd9b6125551ecf2016ed7dbd61dc618fc876.zip | |
gdbstub: Remove global variable from public interface
Currently, this is only ever queried, so adding a function to check if the
server is enabled is more sensible.
If directly modifying this externally is ever desirable, it should be done
by adding a function to the interface, rather than exposing implementation
details directly.
Diffstat (limited to 'src/core/arm')
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom_interpreter.cpp | 4 | ||||
| -rw-r--r-- | src/core/arm/skyeye_common/armstate.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index 7b8616702..67c45640a 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |||
| @@ -953,7 +953,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) { | |||
| 953 | #define GDB_BP_CHECK \ | 953 | #define GDB_BP_CHECK \ |
| 954 | cpu->Cpsr &= ~(1 << 5); \ | 954 | cpu->Cpsr &= ~(1 << 5); \ |
| 955 | cpu->Cpsr |= cpu->TFlag << 5; \ | 955 | cpu->Cpsr |= cpu->TFlag << 5; \ |
| 956 | if (GDBStub::g_server_enabled) { \ | 956 | if (GDBStub::IsServerEnabled()) { \ |
| 957 | if (GDBStub::IsMemoryBreak() || (breakpoint_data.type != GDBStub::BreakpointType::None && \ | 957 | if (GDBStub::IsMemoryBreak() || (breakpoint_data.type != GDBStub::BreakpointType::None && \ |
| 958 | PC == breakpoint_data.address)) { \ | 958 | PC == breakpoint_data.address)) { \ |
| 959 | GDBStub::Break(); \ | 959 | GDBStub::Break(); \ |
| @@ -1649,7 +1649,7 @@ DISPATCH : { | |||
| 1649 | } | 1649 | } |
| 1650 | 1650 | ||
| 1651 | // Find breakpoint if one exists within the block | 1651 | // Find breakpoint if one exists within the block |
| 1652 | if (GDBStub::g_server_enabled && GDBStub::IsConnected()) { | 1652 | if (GDBStub::IsConnected()) { |
| 1653 | breakpoint_data = | 1653 | breakpoint_data = |
| 1654 | GDBStub::GetNextBreakpointFromAddress(cpu->Reg[15], GDBStub::BreakpointType::Execute); | 1654 | GDBStub::GetNextBreakpointFromAddress(cpu->Reg[15], GDBStub::BreakpointType::Execute); |
| 1655 | } | 1655 | } |
diff --git a/src/core/arm/skyeye_common/armstate.cpp b/src/core/arm/skyeye_common/armstate.cpp index 1465b074e..c36b0208f 100644 --- a/src/core/arm/skyeye_common/armstate.cpp +++ b/src/core/arm/skyeye_common/armstate.cpp | |||
| @@ -182,7 +182,7 @@ void ARMul_State::ResetMPCoreCP15Registers() { | |||
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | static void CheckMemoryBreakpoint(u32 address, GDBStub::BreakpointType type) { | 184 | static void CheckMemoryBreakpoint(u32 address, GDBStub::BreakpointType type) { |
| 185 | if (GDBStub::g_server_enabled && GDBStub::CheckBreakpoint(address, type)) { | 185 | if (GDBStub::IsServerEnabled() && GDBStub::CheckBreakpoint(address, type)) { |
| 186 | LOG_DEBUG(Debug, "Found memory breakpoint @ %08x", address); | 186 | LOG_DEBUG(Debug, "Found memory breakpoint @ %08x", address); |
| 187 | GDBStub::Break(true); | 187 | GDBStub::Break(true); |
| 188 | } | 188 | } |