[Lldb-commits] [lldb] [lldb] Fix "in function" detection in "thread until" (PR #123622)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 29 10:46:37 PST 2025
================
@@ -970,19 +969,21 @@ class CommandObjectThreadUntil : public CommandObjectParsed {
return;
}
- AddressRange fun_addr_range = sc.function->GetAddressRange();
- Address fun_start_addr = fun_addr_range.GetBaseAddress();
- line_table->FindLineEntryByAddress(fun_start_addr, function_start,
- &index_ptr);
-
- Address fun_end_addr(fun_start_addr.GetSection(),
- fun_start_addr.GetOffset() +
- fun_addr_range.GetByteSize());
-
- bool all_in_function = true;
+ uint32_t lowest_func_idx = UINT32_MAX;
+ uint32_t highest_func_idx = 0;
+ for (AddressRange range : sc.function->GetAddressRanges()) {
+ uint32_t idx;
+ LineEntry unused;
+ Address addr = range.GetBaseAddress();
+ if (line_table->FindLineEntryByAddress(addr, unused, &idx))
+ lowest_func_idx = std::min(lowest_func_idx, idx);
+
+ addr.Slide(range.GetByteSize() - 1);
----------------
jimingham wrote:
Magical -1's...
https://github.com/llvm/llvm-project/pull/123622
More information about the lldb-commits
mailing list