File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -788,7 +788,16 @@ bool DbgEngAdapter::AttachInternal(std::uint32_t pid)
788788 auto adapterSettings = GetAdapterSettings ();
789789 auto attachPID = adapterSettings->Get <uint64_t >(" attach.pid" , data, &scope);
790790
791- this ->Start ();
791+ if (!this ->Start ())
792+ {
793+ this ->Reset ();
794+ DebuggerEvent event;
795+ event.type = LaunchFailureEventType;
796+ event.data .errorData .error = fmt::format (" Failed to initialize DbgEng" );
797+ event.data .errorData .shortError = fmt::format (" Failed to initialize DbgEng" );
798+ PostDebuggerEvent (event);
799+ return false ;
800+ }
792801
793802 if (const auto result = this ->m_debugControl ->SetEngineOptions (DEBUG_ENGOPT_INITIAL_BREAK); result != S_OK)
794803 {
@@ -1049,7 +1058,10 @@ std::vector<DebugProcess> DbgEngAdapter::GetProcessList()
10491058 if (!m_dbgengInitialized)
10501059 {
10511060 if (!Start ())
1061+ {
1062+ LogWarn (" Failed to initialize DbgEn" );
10521063 return {};
1064+ }
10531065 }
10541066
10551067 ULONG Count = 0 ;
You can’t perform that action at this time.
0 commit comments