llvm-project/lldb/source/Target
Pavel Labath 78521ef545 Fix race condition with -o "process launch" on linux
Summary:
starting a debug session on linux with -o "process launch" lldb parameter was failing since
Target::Launch (in sychronous mode) is expecting to be able to receive public process events.
However, PlatformLinux did not set up event hijacking on process launch, which caused these
events to be processed elsewhere and left Target::Launch hanging. This patch enables event
interception in PlatformLinux (which was commented out).

Upon enabling event interception, I noticed an issue, which I traced back to the inconsistent
state of public run lock, which remained false even though public and private process states were
"stopped". I addressed this by making sure the run lock is "stopped" upon exit from
WaitForProcessToStop (which already had similar provisions for other return paths).

Test Plan: This should fix the intermittent TestFormats failure we have been experiencing on Linux.

Reviewers: jingham, clayborg, vharron

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8079

llvm-svn: 231460
2015-03-06 10:52:47 +00:00
..
ABI.cpp Don't #include ClangPersistentVariables.h from Process.h 2015-03-03 21:05:17 +00:00
CMakeLists.txt Moving header files from source/Host/common to proper location. 2015-02-03 01:51:38 +00:00
CPPLanguageRuntime.cpp Fixed the C++ method name class to be a bit more picky about what it identifies as a C++ method. 2014-11-05 23:56:37 +00:00
ExecutionContext.cpp Add missing "return" statements. 2015-02-25 16:01:12 +00:00
FileAction.cpp Enable local llgs debugging on Linux when the use-llgs-for-local setting is enabled. 2014-10-10 00:09:16 +00:00
InstrumentationRuntime.cpp LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction 2014-10-10 23:43:03 +00:00
InstrumentationRuntimeStopInfo.cpp LLDB AddressSanitizer instrumentation runtime plugin, breakpint on error and report data extraction 2014-10-10 23:43:03 +00:00
JITLoader.cpp Moved JITLoader.cpp and JITLoaderList.cpp over into "source/Target" since the header files were in "include/lldb/Target". 2014-03-06 00:14:12 +00:00
JITLoaderList.cpp Create a Process::ModulesDidLoad() method to handle process-related tasks, as suggested by Jim Ingham. Make JITLoader instances use this to probe only new modules for relevant JIT symbols. Also re-enable the JITLoader hooks in Process. 2014-03-13 09:37:02 +00:00
LanguageRuntime.cpp Add additional DWARF 5 language constants. 2015-02-06 06:46:52 +00:00
Makefile
Memory.cpp Clean-up warnings on Linux/GCC 2014-09-16 06:34:29 +00:00
MemoryHistory.cpp Fix MemoryHistory plugin to check whether the plugin 2014-10-16 16:59:23 +00:00
ObjCLanguageRuntime.cpp Reduce header footprint of Target.h 2015-03-03 19:23:09 +00:00
OperatingSystem.cpp <rdar://problem/13854277> 2013-05-10 21:47:16 +00:00
PathMappingList.cpp Start converting usages of off_t to other types. 2014-07-02 17:24:07 +00:00
Platform.cpp Don't #include ClangPersistentVariables.h from Process.h 2015-03-03 21:05:17 +00:00
Process.cpp Fix race condition with -o "process launch" on linux 2015-03-06 10:52:47 +00:00
ProcessInfo.cpp Pull ProcessInfo and ProcessLaunchInfo out of Target/Process. 2014-06-30 00:30:53 +00:00
ProcessLaunchInfo.cpp Fix errors building on linux. 2015-03-03 23:36:51 +00:00
Queue.cpp Add a SBQueue::GetKind() method to retrieve the type of libdispatch queue (serial or concurrent). 2014-03-13 02:54:54 +00:00
QueueItem.cpp Correctly add the QueueID to a pending block's extended thread backtrace thread. 2014-03-10 08:42:03 +00:00
QueueList.cpp Add new Queue, QueueItem, Queuelist, SBQueue, SBQueueItem classes to represent 2013-12-13 00:29:16 +00:00
RegisterContext.cpp Replace uint32_t by lldb::RegisterKing in register context API. 2014-07-02 09:51:28 +00:00
SectionLoadHistory.cpp Fix typos. 2014-07-01 21:22:11 +00:00
SectionLoadList.cpp Fix typos. 2014-07-08 18:05:41 +00:00
StackFrame.cpp Remove duplicated code for synthetic array members. 2015-02-26 23:55:39 +00:00
StackFrameList.cpp Add null RegisterContext assertions 2015-02-23 18:12:20 +00:00
StackID.cpp sweep up -Wformat warnings from gcc 2014-04-04 04:06:10 +00:00
StopInfo.cpp Don't #include FormatManager.h from Debugger.h 2015-03-03 23:11:11 +00:00
SystemRuntime.cpp Change the Mac OS X SystemRuntime plugin from using the placeholder 2014-02-05 05:44:54 +00:00
Target.cpp Don't #include FormatManager.h from Debugger.h 2015-03-03 23:11:11 +00:00
TargetList.cpp Fixed the failing test: 2015-01-28 22:08:17 +00:00
Thread.cpp Further reduce header footprint of Debugger.h. 2015-03-04 01:58:01 +00:00
ThreadCollection.cpp [lldb] Abstract a superclass for a generic thread container. 2014-09-05 19:13:15 +00:00
ThreadList.cpp [lldb] Abstract a superclass for a generic thread container. 2014-09-05 19:13:15 +00:00
ThreadPlan.cpp Add null RegisterContext assertions 2015-02-23 18:12:20 +00:00
ThreadPlanBase.cpp Improve logging a bit by printing the exception or signal type description. 2014-02-27 19:35:12 +00:00
ThreadPlanCallFunction.cpp Reduce header footprint of Target.h 2015-03-03 19:23:09 +00:00
ThreadPlanCallUserExpression.cpp Don't #include clang headers from BreakpointLocation.h 2015-03-04 17:43:00 +00:00
ThreadPlanPython.cpp This checkin is the first step in making the lldb thread stepping mechanism more accessible from 2014-09-29 23:17:18 +00:00
ThreadPlanRunToAddress.cpp Fix typos. 2014-07-01 21:22:11 +00:00
ThreadPlanShouldStopHere.cpp When stepping, handle the case where the step leaves us with 2014-08-06 01:49:59 +00:00
ThreadPlanStepInRange.cpp Remove unneeded local var initialization. 2014-10-15 03:06:23 +00:00
ThreadPlanStepInstruction.cpp "nexti" should not step over inlined functions. 2014-11-20 22:04:45 +00:00
ThreadPlanStepOut.cpp Reduce header footprint of Target.h 2015-03-03 19:23:09 +00:00
ThreadPlanStepOverBreakpoint.cpp Fix stepping over the inserted breakpoint trap when the NEXT instruction 2014-10-08 01:03:54 +00:00
ThreadPlanStepOverRange.cpp This checkin is the first step in making the lldb thread stepping mechanism more accessible from 2014-09-29 23:17:18 +00:00
ThreadPlanStepRange.cpp This checkin is the first step in making the lldb thread stepping mechanism more accessible from 2014-09-29 23:17:18 +00:00
ThreadPlanStepThrough.cpp Not all processes have a Dynamic Loader. Be sure to check that it exists before using it. 2014-09-30 20:33:25 +00:00
ThreadPlanStepUntil.cpp Fetching the parent frame may fail, handle that case. Patch from Tong Shen. 2014-08-11 23:57:43 +00:00
ThreadPlanTracer.cpp Don't #include FormatManager.h from Debugger.h 2015-03-03 23:11:11 +00:00
ThreadSpec.cpp Resolve printf formatting warnings on Linux: 2012-11-29 21:49:15 +00:00
UnixSignals.cpp Moved Args::StringToXIntYZ to StringConvert::ToXIntYZ 2015-01-15 20:08:35 +00:00
UnwindAssembly.cpp Fix UnwindAssembly memory leak by defining and using a shared UnwindAssemblySP type. 2014-02-03 23:49:47 +00:00