This patch adds support for the DW_AT_trampoline attribute whose value
is a boolean. Which is a "generic trampoline". Stepping into a generic
trampoline by default will step through the function, checking
at every branch, until we stop in a function which makes sense to stop
at (a function with debug info, which isn't a trampoline, for example).
Details
Diff Detail
- Repository
 - rG LLVM Github Monorepo
 
Event Timeline
| lldb/source/Core/Module.cpp | ||
|---|---|---|
| 782 | You can hoist target::GetGlobalProperties().GetEnableTrampolineSupport() out of the loop. Right now it will need to be recomputed every time in because someone could change the setting in the meantime and although it's a little far fetched, that's probably not what you want anyway.  | |
| lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | ||
| 2443 | Let's make this const for consistence with func_user_id (and remove the newline as they're related).  | |
| lldb/source/Target/ThreadPlanStepRange.cpp | ||
| 509–527 | I know you copy pasted this but this can be simplified quite a bit.  | |
Be handy to mark this abandoned when you get a chance
Augusto had already abandoned it when he wrote that reply, maybe you're looking at a different patch or stale tab?
| lldb/include/lldb/Symbol/Function.h | ||
|---|---|---|
| 439 | Is the "generic" qualifier necessary here? If we later add support for trampolines with a jump target maybe, but without that this seems to just create opportunity for confusion, particularly for Swift where the word "generic" has very different connotations.  | |
| lldb/source/Target/ThreadPlanStepThroughGenericTrampoline.cpp | ||
| 2 | formatting  | |
LGTM with Adrian's and my comments addressed.
| lldb/include/lldb/Symbol/Function.h | ||
|---|---|---|
| 439 | I wondered that too, but assumed we were still planning to support trampolines with a target. If not, then +1 on making this just "trampoline".  | |
| lldb/source/Target/ThreadPlanStepRange.cpp | ||
| 520–522 | LLDB_LOG(GetLog(LLDBLog::Step), "ThreadPlanStepRange got asked if it explains the stop for some reason other than step.");  | |
Is the "generic" qualifier necessary here? If we later add support for trampolines with a jump target maybe, but without that this seems to just create opportunity for confusion, particularly for Swift where the word "generic" has very different connotations.