mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Remove redundant code. Add "break after syscall" button, fix up
This commit is contained in:
1 parent
27122a9e64
commit
5817f60346
3 files changed
+15
-11
No files matched your search
+9
-6
@@ -371,18 +371,23 @@ void hleCoreTimingForceCheck() {
|
||||
}
|
||||
|
||||
// Pauses execution after an HLE call.
|
||||
bool hleExecuteDebugBreak(const HLEFunction &func)
|
||||
{
|
||||
static bool hleExecuteDebugBreak(const HLEFunction *func) {
|
||||
if (!func || coreState == CORE_RUNNING_GE) {
|
||||
// Let's break on the next one.
|
||||
return false;
|
||||
}
|
||||
|
||||
const u32 NID_SUSPEND_INTR = 0x092968F4, NID_RESUME_INTR = 0x5F10D406;
|
||||
|
||||
// Never break on these, they're noise.
|
||||
u32 blacklistedNIDs[] = {NID_SUSPEND_INTR, NID_RESUME_INTR, NID_IDLE};
|
||||
for (size_t i = 0; i < ARRAY_SIZE(blacklistedNIDs); ++i)
|
||||
{
|
||||
if (func.ID == blacklistedNIDs[i])
|
||||
if (func->ID == blacklistedNIDs[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(Log::CPU, "Broke after syscall: %s", func->name);
|
||||
Core_Break("hle.step", latestSyscallPC);
|
||||
return true;
|
||||
}
|
||||
@@ -624,9 +629,7 @@ static void hleFinishSyscall(const HLEFunction *info) {
|
||||
__KernelReSchedule(hleAfterSyscallReschedReason);
|
||||
|
||||
if ((hleAfterSyscall & HLE_AFTER_DEBUG_BREAK) != 0) {
|
||||
_dbg_assert_(info);
|
||||
if (!hleExecuteDebugBreak(*info))
|
||||
{
|
||||
if (!hleExecuteDebugBreak(info)) {
|
||||
// We'll do it next syscall.
|
||||
hleAfterSyscall = HLE_AFTER_DEBUG_BREAK;
|
||||
hleAfterSyscallReschedReason = 0;
|
||||
|
||||
@@ -1115,6 +1115,12 @@ void ImDisasmWindow::Draw(MIPSDebugInterface *mipsDebug, ImConfig &cfg, CoreStat
|
||||
Core_RequestCPUStep(CPUStepType::Frame, 0);
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::SmallButton("Syscall")) {
|
||||
hleDebugBreak();
|
||||
Core_Resume();
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::SmallButton("Skim");
|
||||
if (ImGui::IsItemActive()) {
|
||||
|
||||
@@ -405,8 +405,6 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
} else { // go
|
||||
lastTicks_ = CoreTiming::GetTicks();
|
||||
|
||||
// If the current PC is on a breakpoint, the user doesn't want to do nothing.
|
||||
breakpoints_->SetSkipFirst(currentMIPS->pc);
|
||||
Core_Resume();
|
||||
}
|
||||
}
|
||||
@@ -430,9 +428,6 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
break;
|
||||
lastTicks_ = CoreTiming::GetTicks();
|
||||
|
||||
// If the current PC is on a breakpoint, the user doesn't want to do nothing.
|
||||
breakpoints_->SetSkipFirst(currentMIPS->pc);
|
||||
|
||||
hleDebugBreak();
|
||||
Core_Resume();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user