mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-03 03:03:50 +01:00
ImDebugger: Source column on the breakpoint list, and record learnings
Adds the source location column to the breakpoint list, the last of the places worth surfacing line info. Exec breakpoints get a real location; memchecks and register breakpoints get "-", since a watched data range and a register aren't tied to a code address. Fixed a pre-existing misalignment found while adding the column: the register breakpoint row never emitted a cell for the Log column, so every following cell sat one to the left - the register name appeared under "Type", the condition under "OpCode" and the hit count under "Cond", with the last column left blank. It has a Log checkbox now like the other two rows (register breakpoints do support the log action), and the register name moved to Size/Label where the memcheck row puts its size. AGENTS.md gets what this stretch of work turned up: - Most files here are CRLF, including every .vcxproj, Android.mk, Makefile.common and AGENTS.md itself. Patching one with a script that reads with universal newlines and writes with newline='' silently rewrites the whole file - it turned a two-line addition into a 5000-line diff, which is invisible in an editor and obvious in git diff --stat. - Don't pipe Python containing backslashes through a bash heredoc; the quoting mangles them and anchors just fail to match for no visible reason. - Headless registers its own debug-output listener, so exception and crash messages never reach the log - they go to stdout, block-buffered when redirected, and taskkill //F discards the buffer instead of flushing. Give the run a short --timeout and let it exit if you need to read a crash trace. - 0xFFFFFFFF decodes to vflush, a real VFPU instruction, so it's useless as "garbage" for testing illegal-instruction handling. - A wsdbg script has to stay connected long enough for what it asked for; ending with :quit straight after cpu.runUntilTime looks exactly like a broken feature. - Where DWARF line info is and isn't available, since it's much narrower than it sounds. - Corrected the note claiming broadcast.config.set only accepts logger and input; it takes all five categories now. UnitTest 55/55. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
This commit is contained in:
1 parent
3f0c2da5a9
commit
14b6623330
2 files changed
+50
-7
No files matched your search
@@ -1023,7 +1023,7 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) {
|
||||
cfg.selectedBreakpoint = -1;
|
||||
}
|
||||
|
||||
if (ImGui::BeginTable("breakpoints", 8, ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersH)) {
|
||||
if (ImGui::BeginTable("breakpoints", 9, ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersH)) {
|
||||
ImGui::TableSetupColumn("Enabled", ImGuiTableColumnFlags_WidthFixed); // Really means action is to pause
|
||||
ImGui::TableSetupColumn("Log", ImGuiTableColumnFlags_WidthFixed); // Really means action is to pause
|
||||
ImGui::TableSetupColumn("Type", ImGuiTableColumnFlags_WidthFixed);
|
||||
@@ -1031,7 +1031,8 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) {
|
||||
ImGui::TableSetupColumn("Size/Label", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("OpCode", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("Cond", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("Hits", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableSetupColumn("Hits", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("Source", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
for (int i = 0; i < (int)bps.size(); i++) {
|
||||
@@ -1073,6 +1074,9 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) {
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("-"); // hits not available on exec bps yet
|
||||
ImGui::TableNextColumn();
|
||||
// Empty unless the game shipped an unstripped ELF - see Core/Debugger/LineInfo.h.
|
||||
ImGui::TextUnformatted(g_lineInfo.LookupString(bp.addr).c_str());
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
@@ -1103,6 +1107,8 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) {
|
||||
ImGui::TextUnformatted("-"); // cond
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%d", mc.numHits);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted("-"); // A watched range is data - there's no source line for it.
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
@@ -1117,13 +1123,17 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) {
|
||||
cfg.selectedRegBreakpoint = &rbp - &g_breakpoints.GetRegBreakpoints()[0];
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::CheckboxFlags("", (int *)&rbp.result, BREAK_ACTION_PAUSE);
|
||||
ImGui::CheckboxFlags("##enabled", (int *)&rbp.result, BREAK_ACTION_PAUSE);
|
||||
ImGui::TableNextColumn();
|
||||
// This row used to skip the Log column entirely, which shifted every following cell
|
||||
// one to the left - the register name landed under "Type" and Hits under "Cond".
|
||||
ImGui::CheckboxFlags("##log", (int *)&rbp.result, (int)BREAK_ACTION_LOG);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted("Reg");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(mipsDebug->GetRegName(0, rbp.reg).c_str());
|
||||
ImGui::TextUnformatted("-"); // A register breakpoint isn't tied to an address.
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted("-"); // size/label
|
||||
ImGui::TextUnformatted(mipsDebug->GetRegName(0, rbp.reg).c_str()); // size/label
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted("-"); // opcode
|
||||
ImGui::TableNextColumn();
|
||||
@@ -1134,6 +1144,8 @@ static void DrawBreakpointsView(MIPSDebugInterface *mipsDebug, ImConfig &cfg) {
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%d", rbp.numHits);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted("-"); // No address, so no source line either.
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user