diff options
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/source_view.cpp | 11 | ||||
| -rw-r--r-- | src/ui/ui.cpp | 24 | ||||
| -rw-r--r-- | src/ui/ui.h | 1 |
3 files changed, 31 insertions, 5 deletions
diff --git a/src/ui/source_view.cpp b/src/ui/source_view.cpp index e8e7d1e..652acc0 100644 --- a/src/ui/source_view.cpp +++ b/src/ui/source_view.cpp @@ -190,10 +190,13 @@ namespace Hsdbg if (breakpoint != nullptr) { - draw_list->AddCircleFilled(marker_center, - BREAKPOINT_RADIUS, - breakpoint->enabled ? BREAKPOINT_COLOR - : BREAKPOINT_DISABLED_COLOR); + const ImU32 color = breakpoint->enabled ? BREAKPOINT_COLOR + : BREAKPOINT_DISABLED_COLOR; + + if (breakpoint->resolved) + draw_list->AddCircleFilled(marker_center, BREAKPOINT_RADIUS, color); + else + draw_list->AddCircle(marker_center, BREAKPOINT_RADIUS, color, 0, 1.5f); } else if (gutter_hovered) { diff --git a/src/ui/ui.cpp b/src/ui/ui.cpp index f7cbcae..56348ff 100644 --- a/src/ui/ui.cpp +++ b/src/ui/ui.cpp @@ -169,6 +169,8 @@ namespace Hsdbg { build_default_layout(dockspace_id); m_layout_built = true; + + m_focus_breakpoints = true; } draw_status_bar(debugger); @@ -186,6 +188,12 @@ namespace Hsdbg if (m_visible.demo) ImGui::ShowDemoWindow(&m_visible.demo); + + if (m_focus_breakpoints) + { + ImGui::SetWindowFocus(PANEL_BREAKPOINTS); + m_focus_breakpoints = false; + } } auto Ui::build_default_layout(uint32_t dockspace_id) -> void @@ -460,11 +468,12 @@ namespace Hsdbg ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_ScrollY; - if (ImGui::BeginTable("##breakpoints", 5, flags)) + if (ImGui::BeginTable("##breakpoints", 6, flags)) { ImGui::TableSetupColumn("on", ImGuiTableColumnFlags_WidthFixed, 26.0f); ImGui::TableSetupColumn("id", ImGuiTableColumnFlags_WidthFixed, 30.0f); ImGui::TableSetupColumn("location"); + ImGui::TableSetupColumn("address"); ImGui::TableSetupColumn("hits", ImGuiTableColumnFlags_WidthFixed, 40.0f); ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthFixed, 26.0f); ImGui::TableSetupScrollFreeze(0, 1); @@ -501,6 +510,19 @@ namespace Hsdbg ImGui::SetTooltip("%s", breakpoint.file.string().c_str()); ImGui::TableNextColumn(); + if (breakpoint.resolved) + { + ImGui::Text("0x%llx", static_cast<unsigned long long>(breakpoint.address)); + + if (ImGui::IsItemHovered() && !breakpoint.function.empty()) + ImGui::SetTooltip("%s", breakpoint.function.c_str()); + } + else + { + ImGui::TextDisabled("pending"); + } + + ImGui::TableNextColumn(); ImGui::Text("%u", breakpoint.hit_count); ImGui::TableNextColumn(); diff --git a/src/ui/ui.h b/src/ui/ui.h index 7c0de5d..fd86497 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -74,5 +74,6 @@ namespace Hsdbg bool m_layout_built = false; bool m_console_scroll_pending = false; bool m_load_target_pending = false; + bool m_focus_breakpoints = false; }; } |
