| 791 | |
| 792 | |
| 793 | DebuggerUI::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 | |
| 824 | DebuggerUI::~DebuggerUI() |
nothing calls this directly
no test coverage detected