[Lldb-commits] [PATCH] D114862: Replace StackID's operator "<" with a function returning FrameComparison
Tatyana Krasnukha via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 1 03:50:18 PST 2021
tatyana-krasnukha created this revision.
tatyana-krasnukha added reviewers: labath, jasonmolenda.
tatyana-krasnukha added a project: LLDB.
Herald added a subscriber: JDevlieghere.
tatyana-krasnukha requested review of this revision.
Herald added a subscriber: lldb-commits.
"false" result of the operator can imply not only "the frame is not younger". When CFAs are equal, StackID's operator "<" can only compare symbol contexts of the same function. Otherwise, it also returns false.
In the case I described in D114861 <https://reviews.llvm.org/D114861>, two different frames can have the same CFA, and then the operator's result may be incorrect. "thread step-*" commands get broken in this case.
This patch replaces the operator that can return only boolean value with the function that returns a value of lldb::FrameComparison type. It also updates thread plans to use this function instead of the operator.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114862
Files:
lldb/include/lldb/Target/StackID.h
lldb/include/lldb/Target/ThreadPlanStepOut.h
lldb/source/Target/StackFrameList.cpp
lldb/source/Target/StackID.cpp
lldb/source/Target/ThreadPlanStepInstruction.cpp
lldb/source/Target/ThreadPlanStepOut.cpp
lldb/source/Target/ThreadPlanStepRange.cpp
lldb/source/Target/ThreadPlanStepUntil.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114862.390649.patch
Type: text/x-patch
Size: 13909 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211201/00071d57/attachment.bin>
More information about the lldb-commits
mailing list