llvm-project/lldb
Greg Clayton b9556acc9e SBFrame is now threadsafe using some extra tricks. One issue is that stack
frames might go away (the object itself, not the actual logical frame) when
we are single stepping due to the way we currently sometimes end up flushing
frames when stepping in/out/over. They later will come back to life 
represented by another object yet they have the same StackID. Now when you get
a lldb::SBFrame object, it will track the frame it is initialized with until 
the thread goes away or the StackID no longer exists in the stack for the 
thread it was created on. It uses a weak_ptr to both the frame and thread and
also stores the StackID. These three items allow us to determine when the
stack frame object has gone away (the weak_ptr will be NULL) and allows us to
find the correct frame again. In our test suite we had such cases where we
were just getting lucky when something like this happened:

1 - stop at breakpoint
2 - get first frame in thread where we stopped
3 - run an expression that causes the program to JIT and run code
4 - run more expressions on the frame from step 2 which was very very luckily
    still around inside a shared pointer, yet, not part of the current 
    thread (a new stack frame object had appeared with the same stack ID and
    depth). 
    
We now avoid all such issues and properly keep up to date, or we start 
returning errors when the frame doesn't exist and always responds with
invalid answers.

Also fixed the UserSettingsController  (not going to rewrite this just yet)
so that it doesn't crash on shutdown. Using weak_ptr's came in real handy to
track when the master controller has already gone away and this allowed me to
pull out the previous NotifyOwnerIsShuttingDown() patch as it is no longer 
needed.

llvm-svn: 149231
2012-01-30 07:41:31 +00:00
..
docs When unwinding from the first frame, try to ask the remote debugserver 2011-12-13 05:39:38 +00:00
examples Added a 'gdbremote' python module that adds two commands: start_gdb_log and end_gdb_log. 2012-01-26 02:56:24 +00:00
include SBFrame is now threadsafe using some extra tricks. One issue is that stack 2012-01-30 07:41:31 +00:00
lib This patch combines common code from Linux and FreeBSD into 2012-01-05 19:17:38 +00:00
lldb.xcodeproj Removed the "lldb-forward-rtti.h" header file as it was designed to contain 2012-01-30 02:53:15 +00:00
lldb.xcworkspace I accidentally committed some changes to the 2011-12-21 21:30:33 +00:00
resources Bumping Xcode project versions for lldb-109 and debugserver-167. 2012-01-28 02:48:10 +00:00
scripts Removed the "lldb-forward-rtti.h" header file as it was designed to contain 2012-01-30 02:53:15 +00:00
source SBFrame is now threadsafe using some extra tricks. One issue is that stack 2012-01-30 07:41:31 +00:00
test Move argument checking/manipulation into the front of the function. 2012-01-25 20:50:21 +00:00
tools Fix shell commands that do code signing. 2012-01-28 04:19:15 +00:00
utils Add a utility script: 2011-11-04 01:05:29 +00:00
www Added some clarifications about when the __lldb_init_module would be called 2012-01-26 05:36:07 +00:00
INSTALL.txt You'll need to be running Mac OS X to get lldb to build right now. 2010-06-09 07:29:26 +00:00
LICENSE.TXT test commit 2010-06-09 03:55:24 +00:00
Makefile This patch combines common code from Linux and FreeBSD into 2012-01-05 19:17:38 +00:00