ImDebugger: Add frame-stepping and a "skim" button (single-steps while held down)

This commit is contained in:
Henrik Rydgård committed 2024-12-08 15:12:13 +01:00
1 parent f74e7fb6f5
commit 93baf22369
4 files changed
+52 -11

No files matched your search

+28 -7
View File
@@ -1030,22 +1030,43 @@ void ImDisasmWindow::Draw(MIPSDebugInterface *mipsDebug, ImConfig &cfg, CoreStat
ImGui::BeginDisabled(coreState != CORE_STEPPING_CPU);
ImGui::SameLine();
if (ImGui::SmallButton("Step Into")) {
ImGui::Text("Step: ");
ImGui::SameLine();
if (ImGui::SmallButton("Into")) {
u32 stepSize = disasmView_.getInstructionSizeAt(mipsDebug->GetPC());
Core_RequestCPUStep(CPUStepType::Into, stepSize);
}
ImGui::SameLine();
if (ImGui::SmallButton("Step Over")) {
u32 stepSize = disasmView_.getInstructionSizeAt(mipsDebug->GetPC());
Core_RequestCPUStep(CPUStepType::Over, stepSize);
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("F11");
}
ImGui::SameLine();
if (ImGui::SmallButton("Step Out")) {
if (ImGui::SmallButton("Over")) {
u32 stepSize = disasmView_.getInstructionSizeAt(mipsDebug->GetPC());
Core_RequestCPUStep(CPUStepType::Over, stepSize);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("F10");
}
ImGui::SameLine();
if (ImGui::SmallButton("Out")) {
Core_RequestCPUStep(CPUStepType::Out, 0);
}
ImGui::SameLine();
if (ImGui::SmallButton("Frame")) {
Core_RequestCPUStep(CPUStepType::Frame, 0);
}
ImGui::SameLine();
ImGui::SmallButton("Skim");
if (ImGui::IsItemActive()) {
u32 stepSize = disasmView_.getInstructionSizeAt(mipsDebug->GetPC());
Core_RequestCPUStep(CPUStepType::Into, stepSize);
}
ImGui::EndDisabled();
ImGui::SameLine();