Skip to content

Commit d3dea85

Browse files
committed
[debugger] Add symbols to breakpoint visualization
1 parent 8c7eb97 commit d3dea85

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

platforms/shared/desktop/gui_debug_disassembler.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ static void draw_controls(void)
427427
ImGui::TextColored(emu_is_debug_idle() ? red : green, emu_is_debug_idle() ? " PAUSED" : " RUNNING");
428428
}
429429

430-
static const char* k_breakpoint_types[] = { "ROM/RAM ", "VRAM ", "PALETTE ", "6270 ", "6260 " };
430+
static const char* k_breakpoint_types[] = { "ROM/RAM ", "VRAM ", "PALETTE ", "6270 ", "6260 " };
431431

432432
static void draw_breakpoints_content(void)
433433
{
@@ -528,6 +528,8 @@ static void draw_breakpoints_content(void)
528528

529529
GG_Disassembler_Record* record = emu_get_core()->GetMemory()->GetDisassemblerRecord(brk->address1);
530530

531+
bool symbol_shown = false;
532+
531533
if (!brk->range && (brk->type == HuC6280::HuC6280_BREAKPOINT_TYPE_ROMRAM) && IsValidPointer(record))
532534
{
533535
DebugSymbol* symbol = fixed_symbols[record->bank][brk->address1];
@@ -537,10 +539,11 @@ static void draw_breakpoints_content(void)
537539
{
538540
ImGui::SameLine(0, 0);
539541
ImGui::TextColored(brk->enabled ? green : gray, " %s", symbol->text);
542+
symbol_shown = true;
540543
}
541544
}
542545

543-
if (brk->execute && IsValidPointer(record))
546+
if (!symbol_shown && brk->execute && IsValidPointer(record))
544547
{
545548
ImGui::SameLine(0, 0);
546549
ImGui::PushStyleColor(ImGuiCol_Text, brk->enabled ? white : gray);

0 commit comments

Comments
 (0)