llvm-project/lldb/source/Plugins
Greg Clayton e521966054 Fixed a race condition that could cause ProcessGDBRemote::DoResume() to return
an error saying the resume timed out. Previously the thread that was trying
to resume the process would eventually call ProcessGDBRemote::DoResume() which
would broadcast an event over to the async GDB remote thread which would sent the
continue packet to the remote gdb server. Right after this was sent, it would
set a predicate boolean value (protected by a mutex and condition) and then the
thread that issued the ProcessGDBRemote::DoResume() would then wait for that
condition variable to be set. If the async gdb thread was too quick though, the
predicate boolean value could have been set to true and back to false by the
time the thread that issued the ProcessGDBRemote::DoResume() checks the boolean
value. So we can't use the predicate value as a handshake. I have changed the code
over to using a Event by having the GDB remote communication object post an
event: 

	GDBRemoteCommunication::eBroadcastBitRunPacketSent

This allows reliable handshaking between the two threads and avoids the erroneous
ProcessGDBRemote::DoResume() errors.

Added a host backtrace service to allow in process backtraces when trying to track
down tricky issues. I need to see if LLVM has any backtracing abilities abstracted
in it already, and if so, use that, but I needed something ASAP for the current issue
I was working on. The static function is:

void
Host::Backtrace (Stream &strm, uint32_t max_frames);

And it will backtrace at most "max_frames" frames for the current thread and can be
used with any of the Stream subclasses for logging.

llvm-svn: 120793
2010-12-03 06:02:24 +00:00
..
ABI Modified the lldb_private::Type clang type resolving code to handle three 2010-11-13 03:52:47 +00:00
Disassembler/llvm Fixed a bug where the LLVM disassembler was 2010-11-10 01:38:28 +00:00
DynamicLoader/MacOSX-DYLD Fixed Process::Halt() as it was broken for "process halt" after recent changes 2010-11-18 05:57:03 +00:00
LanguageRuntime Moved the code in ClangUserExpression that set up & ran the thread plan with timeouts, and restarting with all threads into a utility function in Process. This required a bunch of renaming. 2010-11-30 02:22:11 +00:00
ObjectContainer Add UserSettings to Target class, making Target settings 2010-09-20 20:44:43 +00:00
ObjectFile Updated the lldb_private::Flags class to have better method names and made 2010-10-27 03:32:59 +00:00
Process Fixed a race condition that could cause ProcessGDBRemote::DoResume() to return 2010-12-03 06:02:24 +00:00
SymbolFile When we resolve a forward declaration type, be sure to put it into the m_die_to_type map so we don't assert later when someone tries to resolve the type. 2010-11-20 19:16:50 +00:00
SymbolVendor/MacOSX Change over to using the definitions for mach-o types and defines to the 2010-07-21 22:12:05 +00:00
Makefile Fix makefiles to build properly on Darwin. 2010-07-24 04:10:59 +00:00