hanchenye-llvm-project/lldb/source
Jason Molenda cabd1b71c7 I'm not thrilled with how I structured this but RegisterContextLLDB
needs to use the current pc and current offset in two ways:  To 
determine which function we are currently executing, and the decide
how much of that function has executed so far.  For the former use,
we need to back up the saved pc value by one byte if we're going to
use the correct function's unwind information -- we may be executing
a CALL instruction at the end of a function and the following instruction
belongs to a new function, or we may be looking at unwind information
which only covers the call instruction and not the subsequent instruction.

But when we're talking about deciding which row of an UnwindPlan to
execute, we want to use the actual byte offset in the function, not the
byte offset - 1.

Right now RegisterContextLLDB is tracking both the "real" offset and
an "offset minus one" and different parts of the class have to know 
which one to use and they need to be updated/set in tandem.  I want
to revisit this at some point.

The second change made in looking up eh_frame information; it was
formerly done by looking for the start address of the function we
are currently executing.  But it is possible to have unwind information
for a function which only covers a small section of the function's
address range.  In which case looking up by the start pc value may not
find the eh_frame FDE.

The hand-written _sigtramp() unwind info on Mac OS X, which covers
exactly one instruction in the middle of the function, happens to
trigger both of these issues.

I still need to get the UnwindPlan runner to handle arbitrary dwarf
expressions in the FDE but there's a good chance it will be easy to
reuse the DWARFExpression class to do this.

llvm-svn: 118882
2010-11-12 05:23:10 +00:00
..
API Fixed FileSpec's operator == to deal with equivalent paths such as "/tmp/a.c" 2010-11-08 00:28:40 +00:00
Breakpoint Modified all logging calls to hand out shared pointers to make sure we 2010-11-06 01:53:30 +00:00
Commands Silence a bunch of clang warnings. 2010-11-10 20:16:47 +00:00
Core Add ThreadPlanTracer class to allow instruction step tracing of execution. 2010-11-11 19:26:09 +00:00
Expression Trivial fix for an error message. 2010-11-10 19:02:11 +00:00
Host Silence a bunch of clang warnings. 2010-11-10 20:16:47 +00:00
Interpreter Move the embedded Python interpreter onto a separate thread, to prevent 2010-11-10 19:18:14 +00:00
Plugins I'm not thrilled with how I structured this but RegisterContextLLDB 2010-11-12 05:23:10 +00:00
Symbol I'm not thrilled with how I structured this but RegisterContextLLDB 2010-11-12 05:23:10 +00:00
Target Added a thread plan tracer that prints lines of 2010-11-12 03:22:21 +00:00
Utility Cleaned a few build related things up: 2010-09-24 23:07:41 +00:00
Makefile Patch from Jean-Daniel Dupas: 2010-07-12 23:14:00 +00:00
lldb-log.cpp Move the embedded Python interpreter onto a separate thread, to prevent 2010-11-10 19:18:14 +00:00
lldb.cpp Add a ObjC V1 runtime, and a generic AppleObjCRuntime plugin. 2010-11-04 18:30:59 +00:00