[Lldb-commits] [PATCH] D69503: [LLDB] [Windows] Don't crash if the debugged process is unable to start up
Martin Storsjö via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 28 04:25:16 PDT 2019
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69503.226637.patch
Type: text/x-patch
Size: 580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191028/24725bbc/attachment.bin>
More information about the lldb-commits
mailing list