@@ -27,7 +27,9 @@ constexpr uint32_t g_nDebuggerWndSizeY = 800;
2727DebuggerApp::DebuggerApp ()
2828{
2929 setPartActive (true );
30- setPartVisible (true );
30+ setPartRenderable (true );
31+
32+ m_pDebugger = new amD::Debugger (this ); // Debugger client
3133}
3234
3335
@@ -43,14 +45,7 @@ void DebuggerApp::init()
4345 createRenderWindow ();
4446 initImGui ();
4547
46- amD::IVmConnectionsManager* pConnMgr = m_pApp->getInterface_ <amD::IVmConnectionsManager>();
47- ASSERT_AND_DO (pConnMgr, return );
48- ref_ptr<IVmServiceConnection> pCurConnect = pConnMgr->createVmConnectionByInd (0 );
49- assert (pCurConnect);
50-
51- m_pDebugger = new amD::Debugger (this , pCurConnect); // Debugger client
52- m_pDebugger->init ();
53-
48+ // m_pDebugger->setConnection(pCurConnect);
5449
5550 assert (m_pDebugger);
5651 qd::UiNodeCreator mk;
@@ -88,7 +83,6 @@ void DebuggerApp::createRenderWindow()
8883
8984void DebuggerApp::initImGui ()
9085{
91-
9286 auto pImGuiMgr = qd::ModuleManager::get ()->getModuleInstOrCreate_ <qd::ImGuiContextManager>();
9387 m_pQimGuiCtx = pImGuiMgr->createContextImGui (m_pWindow, m_pWndRenderer);
9488
@@ -115,13 +109,6 @@ qd::EFlow DebuggerApp::applyOperationMsgProcImp(qd::operation::BaseOpArgs* p_msg
115109}
116110
117111
118- // amD::DebuggerApp* DebuggerApp::get() {
119- // return g_pInstance;
120- // }
121-
122-
123-
124-
125112void DebuggerApp::destroy ()
126113{
127114 if (m_pOperationMgr)
@@ -147,6 +134,7 @@ void DebuggerApp::update(float /*dt*/, float /*time*/)
147134 if (isWndVisible ())
148135 {
149136 m_pQimGuiCtx->newFrame ();
137+ getDbg ()->fetchVmState ();
150138 m_pGui->drawImGuiMainFrame ();
151139 m_pQimGuiCtx->endFrame ();
152140 }
@@ -176,12 +164,12 @@ void DebuggerApp::setWndVisible(bool v)
176164 if (v)
177165 {
178166 SDL_ShowWindow (m_pWindow);
179- setPartVisible (true );
167+ setPartRenderable (true );
180168 }
181169 else
182170 {
183171 SDL_HideWindow (m_pWindow);
184- setPartVisible (false );
172+ setPartRenderable (false );
185173 }
186174}
187175
@@ -212,6 +200,12 @@ qd::EFlow DebuggerApp::onSdlEventProc(SDL_Event& event)
212200}
213201
214202
203+ IVm::VM* DebuggerApp::getVm () const
204+ {
205+ return m_pDebugger->getVm ();
206+ }
207+
208+
215209const amD::Breakpoint* BreakpointsSortedList::getBpByAddr (AddrRef addr, EReg /* reg*/ ) const
216210{
217211 OneAddrBp lh;
0 commit comments