From d14d52158bc444e2d036067305cf54aeea7c9edb Mon Sep 17 00:00:00 2001 From: David Spickett Date: Wed, 20 Dec 2023 09:37:15 +0000 Subject: [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. --- lldb/source/Target/Thread.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lldb/source/Target/Thread.cpp') 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()) { -- cgit v1.2.3