[Lldb-commits] [lldb] Don't count all the frames just to skip the current inlined ones. (PR #80918)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 6 19:42:01 PST 2024


================
@@ -608,11 +608,10 @@ static bool Evaluate_DW_OP_entry_value(std::vector<Value> &stack,
   StackFrameSP parent_frame = nullptr;
   addr_t return_pc = LLDB_INVALID_ADDRESS;
   uint32_t current_frame_idx = current_frame->GetFrameIndex();
-  uint32_t num_frames = thread->GetStackFrameCount();
-  for (uint32_t parent_frame_idx = current_frame_idx + 1;
-       parent_frame_idx < num_frames; ++parent_frame_idx) {
+
+  for (uint32_t parent_frame_idx = current_frame_idx + 1;;parent_frame_idx++) {
----------------
clayborg wrote:

yeah, I would second that suggestion to make the code easier to read.

https://github.com/llvm/llvm-project/pull/80918


More information about the lldb-commits mailing list