Cleanup new code, add docs and error handling
This commit is contained in:
parent
0d4c93d1c2
commit
6e45de760e
5 changed files with 112 additions and 59 deletions
|
@ -1141,8 +1141,8 @@ void SVC::Break(u8 break_reason) {
|
|||
system.SetStatus(Core::System::ResultStatus::ErrorUnknown);
|
||||
}
|
||||
|
||||
/// Used to output a message on a debug hardware unit, or for the GDB HIO
|
||||
// protocol - 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 (!memory.IsValidVirtualAddress(*kernel.GetCurrentProcess(), address)) {
|
||||
LOG_WARNING(Kernel_SVC, "OutputDebugString called with invalid address {:X}", address);
|
||||
|
@ -1154,7 +1154,8 @@ void SVC::OutputDebugString(VAddr address, s32 len) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (len <= 0) {
|
||||
if (len < 0) {
|
||||
LOG_WARNING(Kernel_SVC, "OutputDebugString called with invalid length {}", len);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2224,7 +2225,7 @@ const std::array<SVC::FunctionDef, 180> SVC::SVC_Table{{
|
|||
{0x60, nullptr, "DebugActiveProcess"},
|
||||
{0x61, nullptr, "BreakDebugProcess"},
|
||||
{0x62, nullptr, "TerminateDebugProcess"},
|
||||
{0x63, nullptr, "GetProcessDebugEvent"}, // TODO: do we need this for HIO to work?
|
||||
{0x63, nullptr, "GetProcessDebugEvent"},
|
||||
{0x64, nullptr, "ContinueDebugEvent"},
|
||||
{0x65, &SVC::Wrap<&SVC::GetProcessList>, "GetProcessList"},
|
||||
{0x66, nullptr, "GetThreadList"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue