summaryrefslogtreecommitdiff
path: root/lldb/source/Target/Thread.cpp
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2024-08-07 14:00:59 -0700
committerFlorian Mayer <fmayer@google.com>2024-08-07 14:00:59 -0700
commit890289dfb61757cc3f8fd5feb093131ebc3b7477 (patch)
treeb9b69f1881544d20a2c05f84c42a0a5805128f4e /lldb/source/Target/Thread.cpp
parentb58d0717d588624eae77aea330e94f52607448c9 (diff)
parent6a3604ef8592edf39fedd6af8100aefafd6d931d (diff)
[𝘀𝗽𝗿] changes introduced through rebaseusers/fmayer/spr/main.compiler-rt-tsan-leave-bufferedstacktrace-uninit
Created using spr 1.3.4 [skip ci]
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r--lldb/source/Target/Thread.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index a62074b9a3ea..74d1a268c6df 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -143,6 +143,12 @@ uint64_t ThreadProperties::GetMaxBacktraceDepth() const {
idx, g_thread_properties[idx].default_uint_value);
}
+uint64_t ThreadProperties::GetSingleThreadPlanTimeout() const {
+ const uint32_t idx = ePropertySingleThreadPlanTimeout;
+ return GetPropertyAtIndexAs<uint64_t>(
+ idx, g_thread_properties[idx].default_uint_value);
+}
+
// Thread Event Data
llvm::StringRef Thread::ThreadEventData::GetFlavorString() {
@@ -813,12 +819,17 @@ bool Thread::ShouldStop(Event *event_ptr) {
// decide whether they still need to do more work.
bool done_processing_current_plan = false;
-
if (!current_plan->PlanExplainsStop(event_ptr)) {
if (current_plan->TracerExplainsStop()) {
done_processing_current_plan = true;
should_stop = false;
} else {
+ // Leaf plan that does not explain the stop should be popped.
+ // The plan should be push itself later again before resuming to stay
+ // as leaf.
+ if (current_plan->IsLeafPlan())
+ PopPlan();
+
// If the current plan doesn't explain the stop, then find one that does
// and let it handle the situation.
ThreadPlan *plan_ptr = current_plan;
@@ -1715,6 +1726,8 @@ std::string Thread::StopReasonAsString(lldb::StopReason reason) {
return "instrumentation break";
case eStopReasonProcessorTrace:
return "processor trace";
+ case eStopReasonInterrupt:
+ return "async interrupt";
}
return "StopReason = " + std::to_string(reason);