================ @@ -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++) { ---------------- bulbazord wrote:
Suggestion: If you initialize `parent_frame` to `thread->GetStackFrameAtIndex(current_frame_idx + 1)` and move the `parent_frame = ...` bit to the end of the loop, you can have the loop condition be `parent_frame != nullptr` instead of relying on a break statement. https://github.com/llvm/llvm-project/pull/80918 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits