summaryrefslogtreecommitdiffstats
path: root/src/core/gdbstub/gdbstub.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/gdbstub/gdbstub.cpp39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp
index c75d5fc5e..d88e25073 100644
--- a/src/core/gdbstub/gdbstub.cpp
+++ b/src/core/gdbstub/gdbstub.cpp
@@ -450,9 +450,9 @@ static void SendSignal(u32 signal) {
latest_signal = signal;
- std::string buffer = Common::StringFromFormat("T%02x%02x:%08x;%02x:%08x;", latest_signal, 15,
- htonl(Core::AppCore().GetPC()), 13,
- htonl(Core::AppCore().GetReg(13)));
+ std::string buffer =
+ Common::StringFromFormat("T%02x%02x:%08x;%02x:%08x;", latest_signal, 15,
+ htonl(Core::CPU().GetPC()), 13, htonl(Core::CPU().GetReg(13)));
LOG_DEBUG(Debug_GDBStub, "Response: %s", buffer.c_str());
SendReply(buffer.c_str());
}
@@ -539,15 +539,15 @@ static void ReadRegister() {
}
if (id <= R15_REGISTER) {
- IntToGdbHex(reply, Core::AppCore().GetReg(id));
+ IntToGdbHex(reply, Core::CPU().GetReg(id));
} else if (id == CPSR_REGISTER) {
- IntToGdbHex(reply, Core::AppCore().GetCPSR());
+ IntToGdbHex(reply, Core::CPU().GetCPSR());
} else if (id > CPSR_REGISTER && id < FPSCR_REGISTER) {
- IntToGdbHex(reply, Core::AppCore().GetVFPReg(
+ IntToGdbHex(reply, Core::CPU().GetVFPReg(
id - CPSR_REGISTER -
1)); // VFP registers should start at 26, so one after CSPR_REGISTER
} else if (id == FPSCR_REGISTER) {
- IntToGdbHex(reply, Core::AppCore().GetVFPSystemReg(VFP_FPSCR)); // Get FPSCR
+ IntToGdbHex(reply, Core::CPU().GetVFPSystemReg(VFP_FPSCR)); // Get FPSCR
IntToGdbHex(reply + 8, 0);
} else {
return SendReply("E01");
@@ -564,22 +564,22 @@ static void ReadRegisters() {
u8* bufptr = buffer;
for (int reg = 0; reg <= R15_REGISTER; reg++) {
- IntToGdbHex(bufptr + reg * CHAR_BIT, Core::AppCore().GetReg(reg));
+ IntToGdbHex(bufptr + reg * CHAR_BIT, Core::CPU().GetReg(reg));
}
bufptr += (16 * CHAR_BIT);
- IntToGdbHex(bufptr, Core::AppCore().GetCPSR());
+ IntToGdbHex(bufptr, Core::CPU().GetCPSR());
bufptr += CHAR_BIT;
for (int reg = 0; reg <= 31; reg++) {
- IntToGdbHex(bufptr + reg * CHAR_BIT, Core::AppCore().GetVFPReg(reg));
+ IntToGdbHex(bufptr + reg * CHAR_BIT, Core::CPU().GetVFPReg(reg));
}
bufptr += (32 * CHAR_BIT);
- IntToGdbHex(bufptr, Core::AppCore().GetVFPSystemReg(VFP_FPSCR));
+ IntToGdbHex(bufptr, Core::CPU().GetVFPSystemReg(VFP_FPSCR));
SendReply(reinterpret_cast<char*>(buffer));
}
@@ -596,13 +596,13 @@ static void WriteRegister() {
}
if (id <= R15_REGISTER) {
- Core::AppCore().SetReg(id, GdbHexToInt(buffer_ptr));
+ Core::CPU().SetReg(id, GdbHexToInt(buffer_ptr));
} else if (id == CPSR_REGISTER) {
- Core::AppCore().SetCPSR(GdbHexToInt(buffer_ptr));
+ Core::CPU().SetCPSR(GdbHexToInt(buffer_ptr));
} else if (id > CPSR_REGISTER && id < FPSCR_REGISTER) {
- Core::AppCore().SetVFPReg(id - CPSR_REGISTER - 1, GdbHexToInt(buffer_ptr));
+ Core::CPU().SetVFPReg(id - CPSR_REGISTER - 1, GdbHexToInt(buffer_ptr));
} else if (id == FPSCR_REGISTER) {
- Core::AppCore().SetVFPSystemReg(VFP_FPSCR, GdbHexToInt(buffer_ptr));
+ Core::CPU().SetVFPSystemReg(VFP_FPSCR, GdbHexToInt(buffer_ptr));
} else {
return SendReply("E01");
}
@@ -619,20 +619,19 @@ static void WriteRegisters() {
for (int i = 0, reg = 0; reg <= FPSCR_REGISTER; i++, reg++) {
if (reg <= R15_REGISTER) {
- Core::AppCore().SetReg(reg, GdbHexToInt(buffer_ptr + i * CHAR_BIT));
+ Core::CPU().SetReg(reg, GdbHexToInt(buffer_ptr + i * CHAR_BIT));
} else if (reg == CPSR_REGISTER) {
- Core::AppCore().SetCPSR(GdbHexToInt(buffer_ptr + i * CHAR_BIT));
+ Core::CPU().SetCPSR(GdbHexToInt(buffer_ptr + i * CHAR_BIT));
} else if (reg == CPSR_REGISTER - 1) {
// Dummy FPA register, ignore
} else if (reg < CPSR_REGISTER) {
// Dummy FPA registers, ignore
i += 2;
} else if (reg > CPSR_REGISTER && reg < FPSCR_REGISTER) {
- Core::AppCore().SetVFPReg(reg - CPSR_REGISTER - 1,
- GdbHexToInt(buffer_ptr + i * CHAR_BIT));
+ Core::CPU().SetVFPReg(reg - CPSR_REGISTER - 1, GdbHexToInt(buffer_ptr + i * CHAR_BIT));
i++; // Skip padding
} else if (reg == FPSCR_REGISTER) {
- Core::AppCore().SetVFPSystemReg(VFP_FPSCR, GdbHexToInt(buffer_ptr + i * CHAR_BIT));
+ Core::CPU().SetVFPSystemReg(VFP_FPSCR, GdbHexToInt(buffer_ptr + i * CHAR_BIT));
}
}