[all-commits] [llvm/llvm-project] 076341: Make sure SelectMostRelevantFrame happens only whe...
jimingham via All-commits
all-commits at lists.llvm.org
Fri Apr 21 14:21:41 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 076341d1088b0b3e0140178760dc45ac5162cd65
https://github.com/llvm/llvm-project/commit/076341d1088b0b3e0140178760dc45ac5162cd65
Author: Jim Ingham <jingham at apple.com>
Date: 2023-04-21 (Fri, 21 Apr 2023)
Changed paths:
M lldb/include/lldb/Target/Process.h
M lldb/include/lldb/Target/StackFrameList.h
M lldb/include/lldb/Target/Thread.h
M lldb/include/lldb/lldb-private-enumerations.h
M lldb/source/API/SBThread.cpp
M lldb/source/Commands/CommandObjectFrame.cpp
M lldb/source/Commands/CommandObjectThread.cpp
M lldb/source/Commands/CommandObjectType.cpp
M lldb/source/Core/Debugger.cpp
M lldb/source/Core/IOHandlerCursesGUI.cpp
M lldb/source/Core/ValueObject.cpp
M lldb/source/Expression/REPL.cpp
M lldb/source/Plugins/InstrumentationRuntime/ASan/InstrumentationRuntimeASan.cpp
M lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/InstrumentationRuntimeMainThreadChecker.cpp
M lldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
M lldb/source/Plugins/InstrumentationRuntime/UBSan/InstrumentationRuntimeUBSan.cpp
M lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
M lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp
M lldb/source/Target/ExecutionContext.cpp
M lldb/source/Target/Platform.cpp
M lldb/source/Target/Process.cpp
M lldb/source/Target/StackFrameList.cpp
M lldb/source/Target/StopInfo.cpp
M lldb/source/Target/Target.cpp
M lldb/source/Target/Thread.cpp
Log Message:
-----------
Make sure SelectMostRelevantFrame happens only when returning to the user.
This is a user facing action, it is meant to focus the user's attention on
something other than the 0th frame when you stop somewhere where that's
helpful. For instance, stopping in pthread_kill after an assert will select
the assert frame.
This is not something you want to have happen internally in lldb, both
because internally you really don't want the selected frame changing out
from under you, and because the recognizers can do arbitrary work, and that
can cause deadlocks or other unexpected behavior.
However, it's not something that the current code does
explicitly after a stop has been delivered, it's expected to happen implicitly
as part of stopping. I changing this to call SMRF explicitly after a user
stop, but that got pretty ugly quickly.
So I added a bool to control whether to run this and audited all the current
uses to determine whether we're returning to the user or not.
Differential Revision: https://reviews.llvm.org/D148863
More information about the All-commits
mailing list