mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-11 10:16:08 +00:00

Summary: The issue arises due to the wrong unwinder used for the first stack frame, where the default unwinder returns erroneous frame whereas the fallback would have given the correct frame had it been used. The following fix consists of two parts -> 1) The first part changes the unwinding strategy, earlier the default unwinder was used to get 2 more stack frames and if it failed a fallback unwinder was used. Now we try to obtain as many frames (max 10) as we can get from default unwinder and also fallback unwinder and use the one that gives more number of frames. 2) Normally unwindplans are assosciated with functions and the row to be used is obtained from the offset (obtained from the low_pc of the function symbol). Sometimes it may occur that the unwindplan is assosciated to the complete Elf section in which case the offset calculation would be wrong as the debugger uses the same offset originally obtained from the function symbol. Hence this offset is recalculated. Reviewers: tberghammer, lldb-commits, labath, jasonmolenda Subscribers: jingham Differential Revision: http://reviews.llvm.org/D21221 llvm-svn: 274750