mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-18 15:18:10 -05:00
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.
This commit is contained in:
@ -953,7 +953,7 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
|
||||
#define GDB_BP_CHECK \
|
||||
cpu->Cpsr &= ~(1 << 5); \
|
||||
cpu->Cpsr |= cpu->TFlag << 5; \
|
||||
if (GDBStub::g_server_enabled) { \
|
||||
if (GDBStub::IsServerEnabled()) { \
|
||||
if (GDBStub::IsMemoryBreak() || (breakpoint_data.type != GDBStub::BreakpointType::None && \
|
||||
PC == breakpoint_data.address)) { \
|
||||
GDBStub::Break(); \
|
||||
@ -1649,7 +1649,7 @@ DISPATCH : {
|
||||
}
|
||||
|
||||
// Find breakpoint if one exists within the block
|
||||
if (GDBStub::g_server_enabled && GDBStub::IsConnected()) {
|
||||
if (GDBStub::IsConnected()) {
|
||||
breakpoint_data =
|
||||
GDBStub::GetNextBreakpointFromAddress(cpu->Reg[15], GDBStub::BreakpointType::Execute);
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ void ARMul_State::ResetMPCoreCP15Registers() {
|
||||
}
|
||||
|
||||
static void CheckMemoryBreakpoint(u32 address, GDBStub::BreakpointType type) {
|
||||
if (GDBStub::g_server_enabled && GDBStub::CheckBreakpoint(address, type)) {
|
||||
if (GDBStub::IsServerEnabled() && GDBStub::CheckBreakpoint(address, type)) {
|
||||
LOG_DEBUG(Debug, "Found memory breakpoint @ %08x", address);
|
||||
GDBStub::Break(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user