[all-commits] [llvm/llvm-project] ddbce2: Control the "step out through thunk" logic explici...
jimingham via All-commits
all-commits at lists.llvm.org
Fri Feb 28 13:44:39 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ddbce2fd2380a4eafce9065ad991318f46a3292b
https://github.com/llvm/llvm-project/commit/ddbce2fd2380a4eafce9065ad991318f46a3292b
Author: jimingham <jingham at apple.com>
Date: 2025-02-28 (Fri, 28 Feb 2025)
Changed paths:
M lldb/include/lldb/Target/ThreadPlanShouldStopHere.h
M lldb/source/Target/ThreadPlanShouldStopHere.cpp
M lldb/source/Target/ThreadPlanStepInRange.cpp
Log Message:
-----------
Control the "step out through thunk" logic explicitly when pushing thread plans (#129301)
Jonas recently added a trampoline handling strategy for simple language
thunks that does: "step through language thunks stepping in one level
deep and stopping if you hit user code". That was actually pulled over
from the swift implementation. However, this strategy and the strategy
we have to "step out past language thunks" when stepping out come into
conflict if the thunk you are stepping through calls some other function
before dispatching to the intended method. When you step out of the
called function back into the thunk, should you keep stepping out past
the thunk or not?
In most cases, you want to step out past the thunk, but in this
particular case you don't.
This patch adds a way to inform the thread plan (or really it's
ShouldStopHere behavior) of which behavior it should have, and passes
the don't step through thunks to the step through plan it uses to step
through thunks.
I didn't add a test for this because I couldn't find a C++ thunk that
calls another function before getting to the target function. I asked
the clang folks here if they could think of a case where clang would do
this, and they couldn't. If anyone can think of such a construct, it
will be easy to write the step through test for it...
This does happen in swift, however, so when I cherry-pick this to the
swift fork I'll test it there.
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