Skip to content
Open
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
2 changes: 1 addition & 1 deletion ui/ttdbookmarkwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,5 +606,5 @@ SidebarWidget* TTDBookmarkWidgetType::createWidget(ViewFrame* frame, BinaryViewR

SidebarContentClassifier* TTDBookmarkWidgetType::contentClassifier(ViewFrame*, BinaryViewRef data)
{
return new ActiveDebugSessionSidebarContentClassifier(data);
return new ActiveDebugSessionSidebarContentClassifier(data, true);
}
2 changes: 1 addition & 1 deletion ui/ttdcallswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ SidebarWidget* TTDCallsWidgetType::createWidget(ViewFrame* frame, BinaryViewRef

SidebarContentClassifier* TTDCallsWidgetType::contentClassifier(ViewFrame*, BinaryViewRef data)
{
return new ActiveDebugSessionSidebarContentClassifier(data);
return new ActiveDebugSessionSidebarContentClassifier(data, true);
}

void TTDCallsWidgetType::SetPendingQuery(
Expand Down
2 changes: 1 addition & 1 deletion ui/ttdeventswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1197,5 +1197,5 @@ SidebarWidget* TTDEventsWidgetType::createWidget(ViewFrame* frame, BinaryViewRef

SidebarContentClassifier* TTDEventsWidgetType::contentClassifier(ViewFrame*, BinaryViewRef data)
{
return new ActiveDebugSessionSidebarContentClassifier(data);
return new ActiveDebugSessionSidebarContentClassifier(data, true);
}
2 changes: 1 addition & 1 deletion ui/ttdmemorywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ SidebarWidget* TTDMemoryWidgetType::createWidget(ViewFrame* frame, BinaryViewRef

SidebarContentClassifier* TTDMemoryWidgetType::contentClassifier(ViewFrame*, BinaryViewRef data)
{
return new ActiveDebugSessionSidebarContentClassifier(data);
return new ActiveDebugSessionSidebarContentClassifier(data, true);
}

void TTDMemoryWidgetType::SetPendingQuery(ViewFrame* frame, BinaryViewRef data, uint64_t startAddr, uint64_t endAddr, TTDMemoryAccessType accessType)
Expand Down
8 changes: 5 additions & 3 deletions ui/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2181,12 +2181,13 @@ extern "C"
}


ActiveDebugSessionSidebarContentClassifier::ActiveDebugSessionSidebarContentClassifier(BinaryViewRef data)
ActiveDebugSessionSidebarContentClassifier::ActiveDebugSessionSidebarContentClassifier(BinaryViewRef data, bool requireTTD) :
m_requireTTD(requireTTD)
{
m_debugger = DebuggerController::GetController(data);
if (m_debugger)
{
if (m_debugger->IsConnected())
if (m_debugger->IsConnected() && (!m_requireTTD || m_debugger->IsTTD()))
m_contentClassification = SidebarHasRelevantContent;

m_eventIndex = m_debugger->RegisterEventCallback(
Expand All @@ -2197,7 +2198,8 @@ ActiveDebugSessionSidebarContentClassifier::ActiveDebugSessionSidebarContentClas
case ResumeEventType:
case StepIntoEventType:
case TargetStoppedEventType:
m_contentClassification = SidebarHasRelevantContent;
if (!m_requireTTD || (m_debugger && m_debugger->IsTTD()))
m_contentClassification = SidebarHasRelevantContent;
Q_EMIT contentClassificationChanged();
break;
case DetachedEventType:
Expand Down
3 changes: 2 additions & 1 deletion ui/ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ class ActiveDebugSessionSidebarContentClassifier : public SidebarContentClassifi
size_t m_eventIndex;
SidebarContentClassification m_contentClassification = SidebarHasNoContent;
DebuggerControllerRef m_debugger;
bool m_requireTTD;

public:
ActiveDebugSessionSidebarContentClassifier(BinaryViewRef data);
ActiveDebugSessionSidebarContentClassifier(BinaryViewRef data, bool requireTTD = false);
~ActiveDebugSessionSidebarContentClassifier() override;
SidebarContentClassification contentClassification() override { return m_contentClassification; }
};