summaryrefslogtreecommitdiff
path: root/lldb/source/Target/Thread.cpp
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2023-12-20 09:37:15 +0000
committerDavid Spickett <david.spickett@linaro.org>2023-12-20 09:41:33 +0000
commitd14d52158bc444e2d036067305cf54aeea7c9edb (patch)
treede8f1f6ee25b0f117310746c3b3ac606681152ee /lldb/source/Target/Thread.cpp
parent3ae5a9b67fb6372f1e0d3afa9dcc71aef29fdfca (diff)
[lldb][test] Add extra logging for module cache test
And remove the workaround I was trying, as this logging may prove what the actual issue is. Which I think is that the thread plan map in Process is cleared before the threads are destroyed. So Thread::ShouldStop could be getting the current plan, then the plan map is cleared, then Thread::ShouldStop is deciding based on that plan to pop a plan from the now empty stack.
Diffstat (limited to 'lldb/source/Target/Thread.cpp')
-rw-r--r--lldb/source/Target/Thread.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp
index 865cee97e6d8..cbfb323f6d92 100644
--- a/lldb/source/Target/Thread.cpp
+++ b/lldb/source/Target/Thread.cpp
@@ -883,6 +883,18 @@ bool Thread::ShouldStop(Event *event_ptr) {
// If a Controlling Plan wants to stop, we let it. Otherwise, see if
// the plan's parent wants to stop.
+ // Temporary logging to figure out a crash on Arm/AArch64 Linux.
+ {
+ LLDB_LOGF(log, "^^^^^^^^ Thread::ShouldStop plan stack before "
+ "PopPlan ^^^^^^^^");
+ StreamString s;
+ s.IndentMore();
+ GetProcess()->DumpThreadPlansForTID(
+ s, GetID(), eDescriptionLevelVerbose, true /* internal */,
+ false /* condense_trivial */, true /* skip_unreported */);
+ LLDB_LOG(log, s.GetData());
+ }
+
PopPlan();
if (should_stop && current_plan->IsControllingPlan() &&
!current_plan->OkayToDiscard()) {