-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lldb] Avoid Function::GetAddressRange in ThreadPlanStepRange::InSymbol #128515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The existing implementation would probably produce false positives for discontinuous functions. I haven't tried reproducing it because setting up discontinuous functions (and executing them, in particular) is pretty complex and there's nothing particularly interesting happening here.
@llvm/pr-subscribers-lldb Author: Pavel Labath (labath) ChangesThe existing implementation would probably produce false positives for discontinuous functions. I haven't tried reproducing it because setting up discontinuous functions (and executing them, in particular) is pretty complex and there's nothing particularly interesting happening here. Full diff: https://github.com/llvm/llvm-project/pull/128515.diff 1 Files Affected:
diff --git a/lldb/source/Target/ThreadPlanStepRange.cpp b/lldb/source/Target/ThreadPlanStepRange.cpp
index de4cd5995f695..78e1270edcdab 100644
--- a/lldb/source/Target/ThreadPlanStepRange.cpp
+++ b/lldb/source/Target/ThreadPlanStepRange.cpp
@@ -197,9 +197,11 @@ bool ThreadPlanStepRange::InRange() {
bool ThreadPlanStepRange::InSymbol() {
lldb::addr_t cur_pc = GetThread().GetRegisterContext()->GetPC();
if (m_addr_context.function != nullptr) {
- return m_addr_context.function->GetAddressRange().ContainsLoadAddress(
- cur_pc, &GetTarget());
- } else if (m_addr_context.symbol && m_addr_context.symbol->ValueIsAddress()) {
+ AddressRange unused_range;
+ return m_addr_context.function->GetRangeContainingLoadAddress(
+ cur_pc, GetTarget(), unused_range);
+ }
+ if (m_addr_context.symbol && m_addr_context.symbol->ValueIsAddress()) {
AddressRange range(m_addr_context.symbol->GetAddressRef(),
m_addr_context.symbol->GetByteSize());
return range.ContainsLoadAddress(cur_pc, &GetTarget());
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/11957 Here is the relevant piece of the build log for the reference
|
The existing implementation would probably produce false positives for discontinuous functions. I haven't tried reproducing it because setting up discontinuous functions (and executing them, in particular) is pretty complex and there's nothing particularly interesting happening here.