MCPcopy Create free account
hub / github.com/Vector35/debugger / DebuggerUI

Method DebuggerUI

ui/ui.cpp:793–821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

791
792
793DebuggerUI::DebuggerUI(UIContext* context, DebuggerControllerRef controller) :
794 m_context(context), m_controller(controller)
795{
796 connect(this, &DebuggerUI::debuggerEvent, this, &DebuggerUI::updateUI);
797
798 m_eventCallback = m_controller->RegisterEventCallback(
799 [this](const DebuggerEvent& event) {
800 if ((event.type == LaunchEventType) || (event.type == AttachEventType) || (event.type == ConnectEventType))
801 {
802 auto* globalUI = GlobalDebuggerUI::GetForContext(m_context);
803 if (globalUI)
804 globalUI->SetDisplayingGlobalAreaWidgets(true);
805 }
806 emit debuggerEvent(event);
807 },
808 "UI");
809
810 // Since the Controller is constructed earlier than the UI, any breakpoints added before the construction of the UI,
811 // e.g. the entry point breakpoint, will be missing the visual indicator.
812 // Here, we forcibly add them.
813 for (auto bp : m_controller->GetBreakpoints())
814 {
815 DebuggerEvent event;
816 event.type = RelativeBreakpointAddedEvent;
817 event.data.relativeAddress.module = bp.module;
818 event.data.relativeAddress.offset = bp.offset;
819 updateUI(event);
820 }
821}
822
823
824DebuggerUI::~DebuggerUI()

Callers

nothing calls this directly

Calls 3

RegisterEventCallbackMethod · 0.45
GetBreakpointsMethod · 0.45

Tested by

no test coverage detected