[Lldb-commits] [lldb] [lldb][FrameRecognizer] Display the first non-std frame on verbose_trap (PR #108825)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 17 08:34:23 PDT 2024
================
@@ -16,6 +16,31 @@ using namespace llvm;
using namespace lldb;
using namespace lldb_private;
+/// The 0th frame is the artificial inline frame generated to store
+/// the verbose_trap message. So, starting with the current parent frame,
+/// find the first frame that's not inside of the STL.
+static StackFrameSP FindMostRelevantFrame(Thread &selected_thread) {
+ StackFrameSP most_relevant_frame_sp = selected_thread.GetStackFrameAtIndex(1);
+ while (most_relevant_frame_sp) {
----------------
adrian-prantl wrote:
can you add an upper bound for the loop? I'm afraid that this recognizer might be triggered when looking at the backtrace of an infinite recursion, for example, and then LLDB just hangs.
https://github.com/llvm/llvm-project/pull/108825
More information about the lldb-commits
mailing list