mstorsjo created this revision.
mstorsjo added reviewers: labath, amccarth, aleksandr.urakov.
Herald added a subscriber: JDevlieghere.
Herald added a project: LLDB.

This can e.g. happen if the debugged executable depends on unavailable DLLs.

One could also return e.g. Status(ERROR_DLL_NOT_FOUND, eErrorTypeWin32) here, 
but I presume that can be overly specific as I'd guess this condition can 
occurr in other cases as well.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D69503

Files:
  lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp


Index: lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
===================================================================
--- lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
+++ lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
@@ -574,6 +574,8 @@
     LLDB_LOG(log, "hit loader breakpoint, returning.");
 
     process = debugger->GetProcess();
+    if (!m_session_data)
+      return Status("The process failed to launch.");
     return m_session_data->m_launch_error;
   } else
     return Status(::GetLastError(), eErrorTypeWin32);


Index: lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
===================================================================
--- lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
+++ lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
@@ -574,6 +574,8 @@
     LLDB_LOG(log, "hit loader breakpoint, returning.");
 
     process = debugger->GetProcess();
+    if (!m_session_data)
+      return Status("The process failed to launch.");
     return m_session_data->m_launch_error;
   } else
     return Status(::GetLastError(), eErrorTypeWin32);
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to