Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ui/breakpointswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,13 @@ void DebugBreakpointsWidget::jump()

BreakpointItem bp = m_model->getRow(sel[0].row());
UIContext* context = UIContext::contextForWidget(this);
if (!context)
return;

ViewFrame* frame = context->getCurrentViewFrame();
if (!frame)
return;

if (m_controller->GetData())
frame->navigate(m_controller->GetData(), bp.address(), true, true);
}
Expand Down
9 changes: 8 additions & 1 deletion ui/controlswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,14 @@ void DebugControlsWidget::performSettings()
void DebugControlsWidget::toggleBreakpoint()
{
UIContext* context = UIContext::contextForWidget(this);
auto addr = context->getCurrentView()->getCurrentOffset();
if (!context)
return;

View* view = context->getCurrentView();
if (!view)
return;

auto addr = view->getCurrentOffset();
bool isAbsoluteAddress = false;
if (m_controller->IsConnected())
isAbsoluteAddress = true;
Expand Down
11 changes: 11 additions & 0 deletions ui/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,13 @@ void GlobalDebuggerUI::CloseGlobalAreaWidgets(UIContext* context)
void DebuggerUI::navigateDebugger(uint64_t address)
{
ViewFrame* frame = m_context->getCurrentViewFrame();
if (!frame)
return;

View* view = m_context->getCurrentView();
if (!view)
return;

FunctionRef function = view->getCurrentFunction();
if (function)
{
Expand Down Expand Up @@ -1663,8 +1669,13 @@ void DebuggerUI::navigateToMappedAddress()
void DebuggerUI::checkRebaseBinaryView(uint64_t remoteBase)
{
Ref<BinaryView> data = m_controller->GetData();
if (!data)
return;

FileMetadataRef fileMetadata = data->GetFile();
ViewFrame* frame = m_context->getCurrentViewFrame();
if (!frame)
return;

// Halt analysis when replacing a BinaryView in the UI. If the view is replaced and the tab or
// application closes, then the old view may continue analysis without the updated UI having a
Expand Down