[Lldb-commits] [lldb] [lldb] Fix SBThread::StepOverUntil for discontinuous functions (PR #123046)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 16 01:13:07 PST 2025
================
@@ -859,7 +859,9 @@ SBError SBThread::StepOverUntil(lldb::SBFrame &sb_frame,
addr_t step_addr =
sc.line_entry.range.GetBaseAddress().GetLoadAddress(target);
if (step_addr != LLDB_INVALID_ADDRESS) {
- if (fun_range.ContainsLoadAddress(step_addr, target))
+ if (llvm::any_of(fun_ranges, [&](const AddressRange &r) {
----------------
labath wrote:
AddressRanges is a typedef for vector<AddressRange>.
How about using `Block::GetRangeContainingLoadAddress` (Function::GetAddressRanges just returns the data from the function Block) for this instead (see new version of the patch)? Other possibilities might be:
- add Function::GetRangeContainingLoadAddress or Function::ContainsLoadAddress
- add a free function (`ContainsLoadAddress(ArrayRef<AddressRange>, addr_t, Target)`)
https://github.com/llvm/llvm-project/pull/123046
More information about the lldb-commits
mailing list