Stop execution when performing HIO request
Since the HIO request is basically treated like a syscall, we need to stop emulation while waiting for the GDB client to reply with the result. This ensures any memory queries etc. that GDB makes to fulfill the HIO request are accessing memory as it was at the time of the request, instead of afterwards.
This commit is contained in:
parent
b9c11e71d7
commit
f92f494cab
5 changed files with 60 additions and 35 deletions
|
@ -1144,6 +1144,11 @@ void SVC::Break(u8 break_reason) {
|
|||
/// Used to output a message on a debug hardware unit, or for the GDB HIO
|
||||
// protocol - does nothing on a retail unit.
|
||||
void SVC::OutputDebugString(VAddr address, s32 len) {
|
||||
if (!Memory::IsValidVirtualAddress(*kernel.GetCurrentProcess(), address)) {
|
||||
LOG_WARNING(Kernel_SVC, "OutputDebugString called with invalid address {:X}", address);
|
||||
return;
|
||||
}
|
||||
|
||||
if (len == 0) {
|
||||
GDBStub::SetHioRequest(address);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue