summaryrefslogtreecommitdiff
path: root/lldb/source/Target/UnwindLLDB.cpp
AgeCommit message (Collapse)Author
2024-09-23[lldb][NFC] New names for the two RegisterLocation classes (#109611)Jason Molenda
lldb has two RegisterLocation classes that do slightly different things. UnwindPlan::Row::RegisterLocation (new: AbstractRegisterLocation) has a description of how to find a register's value or location, not specific to a particular stopping point. It may say that at a given offset into a function, the caller's register has been spilled to stack memory at CFA minus an offset. Or it may say that the caller's register is at a DWARF exprssion. UnwindLLDB::RegisterLocation (new: ConcreteRegisterLocation) is a specific address where the register is currently stored, or the register it has been copied into, or its value at this point in the current function execution. When lldb stops in a function, it interprets the AbstractRegisterLocation's instructions using the register context and stack memory, to create the ConcreteRegisterLocation at this point in time for this stack frame. I'm not thrilled with AbstractRegisterLocation and ConcreteRegisterLocation, but it's better than the same name and it will be easier to update them if someone suggests a better pair.
2024-05-15[lldb/aarch64] Allow unaligned PC addresses below a trap handler (#92093)Pavel Labath
The stack validation heuristic is counter-productive in this case, as the unaligned address is most likely the thing that caused the signal in the first place.
2022-02-03[lldb] Rename Logging.h to LLDBLog.h and clean up includesPavel Labath
Most of our code was including Log.h even though that is not where the "lldb" log channel is defined (Log.h defines the generic logging infrastructure). This worked because Log.h included Logging.h, even though it should. After the recent refactor, it became impossible the two files include each other in this direction (the opposite inclusion is needed), so this patch removes the workaround that was put in place and cleans up all files to include the right thing. It also renames the file to LLDBLog to better reflect its purpose.
2022-02-02[lldb] Convert "LLDB" log channel to the new APIPavel Labath
2021-12-24Remove redundant return and continue statements (NFC)Kazu Hirata
Identified with readability-redundant-control-flow.
2021-03-03LanguageRuntime for 0th frame unwind, simplify getting pc-for-symbolicationJason Molenda
Add calls into LanguageRuntime when finding the unwind method to use out of the 0th (currently executing) stack frame. Allow for the LanguageRuntimes to indicate if this stack frames should be treated like a zeroth-frame -- symbolication should be done based on the saved pc address, not decremented like normal ABI function calls. Add methods to RegisterContext and StackFrame to get a pc value suitable for symbolication, to reduce the number of places in lldb where we decrement the saved pc values before symbolication. <rdar://problem/70398009> Differential Revision: https://reviews.llvm.org/D97644
2020-03-10[lldb] Make UnwindLLDB a non-pluginPavel Labath
Summary: This is the only real unwinder, and things have been this way for quite a long time. At this point, the class has accumulated so many features it is unlikely that anyone will want to reimplement the whole thing. The class is also fairly closely coupled (through UnwindPlans and FuncUnwinders) with a lot of other lldb components that it is hard to imagine a different unwinder implementation being substantially different without reimplementing all of those. The existing unwinding functionality is nonetheless fairly complex and there is space for adding more structure to it, but I believe a more worthwhile effort would be to take the existing UnwindLLDB class and try to break it down and introduce extension/customization points, instead of writing a brand new Unwind implementation. Reviewers: jasonmolenda, JDevlieghere, xiaobai Subscribers: mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D75848