Add some unconditional logging on the failure points when attaching
to a process so we'll always get messages in the console logs.
Also make the "is frontboard process" / "is backboard process"
determination lazy, specifically take it out of the
MachProcess::AttachForDebug codepath when we are attaching to a
process, to simplify attaching.
<rdar://problem/47982516>
<rdar://problem/48060134>
llvm-svn: 354181
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.h b/lldb/tools/debugserver/source/MacOSX/MachProcess.h
index cd49305..644364b 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.h
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.h
@@ -331,12 +331,11 @@
}
}
- bool ProcessUsingSpringBoard() const {
- return (m_flags & eMachProcessFlagsUsingSBS) != 0;
- }
- bool ProcessUsingBackBoard() const {
- return (m_flags & eMachProcessFlagsUsingBKS) != 0;
- }
+ void CalculateBoardStatus();
+
+ bool ProcessUsingBackBoard();
+
+ bool ProcessUsingFrontBoard();
Genealogy::ThreadActivitySP GetGenealogyInfoForThread(nub_thread_t tid,
bool &timed_out);
@@ -349,9 +348,9 @@
enum {
eMachProcessFlagsNone = 0,
eMachProcessFlagsAttached = (1 << 0),
- eMachProcessFlagsUsingSBS = (1 << 1),
- eMachProcessFlagsUsingBKS = (1 << 2),
- eMachProcessFlagsUsingFBS = (1 << 3)
+ eMachProcessFlagsUsingBKS = (1 << 2), // only read via ProcessUsingBackBoard()
+ eMachProcessFlagsUsingFBS = (1 << 3), // only read via ProcessUsingFrontBoard()
+ eMachProcessFlagsBoardCalculated = (1 << 4)
};
void Clear(bool detaching = false);
void ReplyToAllExceptions();