Merge pull request #6395 from ian-h-chamberlain/feature/gdbstub-hio
Initial port of luma3ds' gdb_hio to Citra
This commit is contained in:
commit
2a2ee8bc96
6 changed files with 391 additions and 20 deletions
|
@ -13,6 +13,7 @@
|
|||
#include "core/arm/arm_interface.h"
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/gdbstub/hio.h"
|
||||
#include "core/hle/kernel/address_arbiter.h"
|
||||
#include "core/hle/kernel/client_port.h"
|
||||
#include "core/hle/kernel/client_session.h"
|
||||
|
@ -1140,9 +1141,21 @@ void SVC::Break(u8 break_reason) {
|
|||
system.SetStatus(Core::System::ResultStatus::ErrorUnknown);
|
||||
}
|
||||
|
||||
/// Used to output a message on a debug hardware unit - does nothing on a retail unit
|
||||
/// Used to output a message on a debug hardware unit, or for the GDB file I/O
|
||||
/// (HIO) protocol - does nothing on a retail unit.
|
||||
void SVC::OutputDebugString(VAddr address, s32 len) {
|
||||
if (len <= 0) {
|
||||
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;
|
||||
}
|
||||
|
||||
if (len < 0) {
|
||||
LOG_WARNING(Kernel_SVC, "OutputDebugString called with invalid length {}", len);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue