Add an SBProcess API to get the current StopID, either considering or ignoring stops caused by expression
evaluation.
<rdar://problem/12968562>
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171914 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index 131aca9..1d24e43 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -509,6 +509,21 @@
return sb_thread;
}
+uint32_t
+SBProcess::GetStopID(bool include_expression_stops)
+{
+ ProcessSP process_sp(GetSP());
+ if (process_sp)
+ {
+ Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
+ if (include_expression_stops)
+ return process_sp->GetStopID();
+ else
+ return process_sp->GetLastNaturalStopID();
+ }
+ return 0;
+}
+
StateType
SBProcess::GetState ()
{