forked from OSchip/llvm-project
2359429168
Summary: This argument was added back in 2010 (r118882) to support the ability to unwind from functions whose eh_frame entry does not cover the entire range of the function. However, due to the caching happening in FuncUnwinders, this solution is very fragile. FuncUnwinders will cache the plan it got from eh_frame regardless of the value of the current_offset, so our ability to unwind from a given function depended what was the value of "current_offset" the first time that this function was called. Furthermore, since the "image show-unwind" command did not know what's the right offset to pass, this created an unfortunate situation where "image show-unwind" would show no valid plans for a function, even though they were available and being used. In this patch I implement the feature slightly differently. Instead of giving just a base address to the eh_frame unwinder, I give it the entire range we are interested in. Then, I change the unwinder to return the first plan that covers (even partially) that range. This way even a partial plan will be returned, regardless of the address in the function where we are stopped at. This solution is still not 100% correct, as it will not handle a function which is covered by two independent fde entries. However, I don't expect anybody will write this kind of functions, and this wasn't handled by the previous implementation either. If this is ever needed in the future. The eh_frame unwinder can be extended to return "composite" unwind plans created by merging sevelar fde entries. I also create a test which triggers this scenario. As doing this is virtually impossible without hand-written assembly, the test only works on x86 linux. Reviewers: jasonmolenda, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D60829 llvm-svn: 358964 |
||
---|---|---|
.. | ||
ArmUnwindInfo.cpp | ||
Block.cpp | ||
CMakeLists.txt | ||
ClangASTContext.cpp | ||
ClangASTImporter.cpp | ||
ClangExternalASTSourceCallbacks.cpp | ||
ClangExternalASTSourceCommon.cpp | ||
ClangUtil.cpp | ||
CompactUnwindInfo.cpp | ||
CompileUnit.cpp | ||
CompilerDecl.cpp | ||
CompilerDeclContext.cpp | ||
CompilerType.cpp | ||
DWARFCallFrameInfo.cpp | ||
DebugMacros.cpp | ||
Declaration.cpp | ||
FuncUnwinders.cpp | ||
Function.cpp | ||
LineEntry.cpp | ||
LineTable.cpp | ||
LocateSymbolFile.cpp | ||
LocateSymbolFileMacOSX.cpp | ||
ObjectFile.cpp | ||
Symbol.cpp | ||
SymbolContext.cpp | ||
SymbolFile.cpp | ||
SymbolVendor.cpp | ||
Symtab.cpp | ||
Type.cpp | ||
TypeList.cpp | ||
TypeMap.cpp | ||
TypeSystem.cpp | ||
UnwindPlan.cpp | ||
UnwindTable.cpp | ||
Variable.cpp | ||
VariableList.cpp | ||
VerifyDecl.cpp |