llvm-project/lldb/source
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
..
API Add proper EOF handling to Communication & Connection classes: 2010-12-02 18:31:56 +00:00
Breakpoint Added support for indicating to the expression parser 2010-11-19 02:52:21 +00:00
Commands Make CommandObjectMultiword::GetSubcommandSP() more robust by appending the 2010-12-01 01:04:22 +00:00
Core Updated to latest LLVM/Clang for external AST source changes that allow 2010-12-02 23:20:03 +00:00
Expression Removed a compiler warning. 2010-12-03 03:02:31 +00:00
Host Fixed a race condition that could cause ProcessGDBRemote::DoResume() to return 2010-12-03 06:02:24 +00:00
Interpreter Add the ability to catch and do the right thing with Interrupts (often control-c) 2010-11-19 20:47:54 +00:00
Plugins Fixed a race condition that could cause ProcessGDBRemote::DoResume() to return 2010-12-03 06:02:24 +00:00
Symbol Updated to latest LLVM/Clang for external AST source changes that allow 2010-12-02 23:20:03 +00:00
Target Fixed a typo in comment. 2010-12-02 20:53:05 +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 Cleaned up code that wasn't using the Initialize and Terminate paradigm by 2010-11-18 23:32:35 +00:00
lldb.cpp Cleaned up code that wasn't using the Initialize and Terminate paradigm by 2010-11-18 23:32:35 +00:00