[all-commits] [llvm/llvm-project] 917ed9: [lldb] Fix "in function" detection in "thread unti...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Fri Feb 21 04:18:00 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 917ed99d815a4cc6bde249d292376f75dbe3700c
https://github.com/llvm/llvm-project/commit/917ed99d815a4cc6bde249d292376f75dbe3700c
Author: Pavel Labath <pavel at labath.sk>
Date: 2025-02-21 (Fri, 21 Feb 2025)
Changed paths:
M lldb/source/Commands/CommandObjectThread.cpp
M lldb/test/API/functionalities/thread/step_until/TestStepUntil.py
Log Message:
-----------
[lldb] Fix "in function" detection in "thread until" (#123622)
The implementation has an optimization which detects the range of line
table entries covered by the function and then only searches for a
matching line between them.
This optimization was interfering with the logic for detecting whether a
line belongs to the function because the first call to FindLineEntry was
made with exact=false, which meant that if the function did not contain
any exact matches, we would just pick the closest line number in that
range, even if it was very far away.
This patch fixes that by first attempting an inexact search across the
entire line table, and then use the (potentially inexact) result of that
for searching within the function. This makes the optimization a less
effective, but I don't think we can differentiate between a line that
belongs to the function (but doesn't have any code) and a line outside
the function without that.
The patch also avoids the use of (deprecated) Function::GetAddressRange
by iterating over the GetAddressRanges result to find the full range of
line entries for the function.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list