hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ui.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2024-11-20 03:25:56 +0100
committerhachem <im@hachem.wtf>2024-11-20 03:25:56 +0100
commitb641d7306c61cdc0b5dcee9fedba434afbfb694b (patch)
tree218fefba0507a3755b6dbf974198568099b2f9d3 /src/ui/ui.cpp
parent406250285d57a8134376b881c3fef6d6481a7740 (diff)
feat: link LLVM
Diffstat (limited to 'src/ui/ui.cpp')
-rw-r--r--src/ui/ui.cpp24
1 files changed, 23 insertions, 1 deletions
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();