clayborg wrote:

> Should the Doxygen comment of GetStackFrameCount warn that this is an 
> expensive operation? 
> https://lldb.llvm.org/cpp_reference/classlldb__private_1_1Thread.html#afc54feef950a58b625bbb198dc4cf57c

It might be nice to add a "std::optional<uint32_t> max_frame_count" to this 
function to allow it to stop when it hits "max_frame_count". Like:

```
/// Get the number of frames in a thread.
///
/// If \a max_frame_count is valid, return a number that is less than or equal 
/// to max_frame_count, else calculate the true number of frames. Calculating
/// the total number of frames can be expensive.
virtual uint32_t 
lldb_private::Thread::GetStackFrameCount(std::optional<uint32_t> 
max_frame_count);
```

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

Reply via email to