From 9f9cf3a2cfb45d2e2f3b3dad704c326114df38eb Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Thu, 18 Dec 2025 22:38:25 -0500 Subject: add go-to address support in native triage view --- examples/triage/view.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'examples/triage/view.cpp') diff --git a/examples/triage/view.cpp b/examples/triage/view.cpp index c845a4fa..8981a99b 100644 --- a/examples/triage/view.cpp +++ b/examples/triage/view.cpp @@ -152,6 +152,9 @@ TriageView::TriageView(QWidget* parent, BinaryViewRef data) : QScrollArea(parent if (m_fullAnalysisButton && (BinaryNinja::Settings::Instance()->Get("analysis.mode", data) == "full")) m_fullAnalysisButton->hide(); + + // Bind the "Go to Address..." action + actionHandler()->bindAction("Go to Address...", UIAction([this]() { goToAddress(); })); } @@ -218,6 +221,22 @@ void TriageView::startFullAnalysis() } +void TriageView::goToAddress() +{ + uint64_t addr; + if (!ViewFrame::getAddressFromInput(this, m_data, addr, getCurrentOffset())) + return; + + ViewFrame* frame = ViewFrame::viewFrameForWidget(this); + if (!frame) + return; + + QString viewType = BinaryNinja::Settings::Instance()->Get("ui.view.graph.preferred") ? "Graph" : "Linear"; + QString dataType = QString::fromStdString(m_data->GetTypeName()); + frame->navigate(viewType + ":" + dataType, addr); +} + + void TriageView::navigateToFileOffset(uint64_t offset) { if (!m_byteView) -- cgit v1.3.1