llvm-project/lldb/source/Target
Jason Molenda fbcb7f2c4e The first part of an lldb native stack unwinder.
The Unwind and RegisterContext subclasses still need
to be finished; none of this code is used by lldb at
this point (unless you call into it by hand).

The ObjectFile class now has an UnwindTable object.

The UnwindTable object has a series of FuncUnwinders
objects (Function Unwinders) -- one for each function
in that ObjectFile we've backtraced through during this
debug session.

The FuncUnwinders object has a few different UnwindPlans.
UnwindPlans are a generic way of describing how to find
the canonical address of a given function's stack frame
(the CFA idea from DWARF/eh_frame) and how to restore the
caller frame's register values, if they have been saved
by this function.

UnwindPlans are created from different sources.  One source is the
eh_frame exception handling information generated by the compiler
for unwinding an exception throw.  Another source is an assembly
language inspection class (UnwindAssemblyProfiler, uses the Plugin
architecture) which looks at the instructions in the funciton
prologue and describes the stack movements/register saves that are
done.

Two additional types of UnwindPlans that are worth noting are
the "fast" stack UnwindPlan which is useful for making a first
pass over a thread's stack, determining how many stack frames there
are and retrieving the pc and CFA values for each frame (enough
to create StackFrameIDs).  Only a minimal set of registers is
recovered during a fast stack walk.  

The final UnwindPlan is an architectural default unwind plan.
These are provided by the ArchDefaultUnwindPlan class (which uses
the plugin architecture).  When no symbol/function address range can
be found for a given pc value -- when we have no eh_frame information
and when we don't have a start address so we can't examine the assembly
language instrucitons -- we have to make a best guess about how to 
unwind.  That's when we use the architectural default UnwindPlan.
On x86_64, this would be to assume that rbp is used as a stack pointer
and we can use that to find the caller's frame pointer and pc value.
It's a last-ditch best guess about how to unwind out of a frame.

There are heuristics about when to use one UnwindPlan versues the other --
this will all happen in the still-begin-written UnwindLLDB subclass of
Unwind which runs the UnwindPlans.

llvm-svn: 113581
2010-09-10 07:49:16 +00:00
..
ABI.cpp
ExecutionContext.cpp Change "Current" as in GetCurrentThread, GetCurrentStackFrame, etc, to "Selected" i.e. GetSelectedThread. Selected makes more sense, since these are set by some user action (a selection). I didn't change "CurrentProcess" since this is always controlled by the target, and a given target can only have one process, so it really can't be selected. 2010-08-26 21:32:51 +00:00
Makefile Merged Eli Friedman's linux build changes where he added Makefile files that 2010-07-09 20:39:50 +00:00
ObjCObjectPrinter.cpp Remove use of STL collection class use of the "data()" method since it isn't 2010-07-20 22:52:08 +00:00
PathMappingList.cpp Minor warning/error fixes. 2010-06-09 09:32:42 +00:00
Process.cpp Add comments to InstanceSettings constructors explaining why they have 2010-09-09 18:26:37 +00:00
RegisterContext.cpp The first part of an lldb native stack unwinder. 2010-09-10 07:49:16 +00:00
StackFrame.cpp Added more API to lldb::SBBlock to allow getting the block 2010-09-07 04:20:48 +00:00
StackFrameList.cpp Added more API to lldb::SBBlock to allow getting the block 2010-09-07 04:20:48 +00:00
StackID.cpp Added a new bool parameter to many of the DumpStopContext() methods that 2010-09-02 21:44:10 +00:00
StopInfo.cpp Make breakpoint commands work again. Added a PerformAction to the stop info - actions are run when the 2010-08-10 00:59:59 +00:00
Target.cpp Added support for inlined stack frames being represented as real stack frames 2010-08-24 00:45:41 +00:00
TargetList.cpp If the file the user specifies can't be found in the current directory, 2010-09-10 04:48:55 +00:00
Thread.cpp Add comments to InstanceSettings constructors explaining why they have 2010-09-09 18:26:37 +00:00
ThreadList.cpp Cleaned up step logging a bit. 2010-09-03 22:45:01 +00:00
ThreadPlan.cpp Cleaned up step logging a bit. 2010-09-03 22:45:01 +00:00
ThreadPlanBase.cpp Abtracted the old "lldb_private::Thread::StopInfo" into an abtract class. 2010-08-04 01:40:35 +00:00
ThreadPlanCallFunction.cpp Added support for rewriting objc_msgSend so we can 2010-07-31 01:32:05 +00:00
ThreadPlanRunToAddress.cpp Two changes in this checkin. Added a ThreadPlanKind so that I can do some reasoning based on the kind of thread plan 2010-06-19 04:45:32 +00:00
ThreadPlanShouldStopHere.cpp
ThreadPlanStepInRange.cpp Add a user settings controller to Thread. Then added a step-avoid-regexp setting 2010-09-08 03:14:33 +00:00
ThreadPlanStepInstruction.cpp Got a lot of the kinks worked out in the inline support after debugging more 2010-08-24 21:05:24 +00:00
ThreadPlanStepOut.cpp Got a lot of the kinks worked out in the inline support after debugging more 2010-08-24 21:05:24 +00:00
ThreadPlanStepOverBreakpoint.cpp Two changes in this checkin. Added a ThreadPlanKind so that I can do some reasoning based on the kind of thread plan 2010-06-19 04:45:32 +00:00
ThreadPlanStepOverRange.cpp Two changes in this checkin. Added a ThreadPlanKind so that I can do some reasoning based on the kind of thread plan 2010-06-19 04:45:32 +00:00
ThreadPlanStepRange.cpp Fixed the StackFrame to correctly resolve the StackID's SymbolContextScope. 2010-09-03 17:10:42 +00:00
ThreadPlanStepThrough.cpp Two changes in this checkin. Added a ThreadPlanKind so that I can do some reasoning based on the kind of thread plan 2010-06-19 04:45:32 +00:00
ThreadPlanStepUntil.cpp Got a lot of the kinks worked out in the inline support after debugging more 2010-08-24 21:05:24 +00:00
ThreadSpec.cpp Change the Breakpoint & BreakpointLocation GetDescription methods so they call the BreakpointOptions::GetDescription rather 2010-06-18 01:00:58 +00:00
UnixSignals.cpp