Don't lock the IOHandlerList::m_mutex in Debugger::RunIOHandler(...) since if a process is resumed or halted, it will try to push/pop the process IOHandler and it will deadlock.

<rdar://problem/18610852>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219620 91177308-0d34-0410-b5e6-96231b3b80d8
Resolve non-pointer isas for metaclasses.
Patch by Enrico Granata.
<rdar://problem/18618298>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219641 91177308-0d34-0410-b5e6-96231b3b80d8
This adds a "batch mode" to lldb kinda like the gdb batch mode.  It will quit the debugger
after all the commands have been executed except if one of the commands was an execution control
command that stopped because of a signal or exception.

Also adds a variant of SBCommandInterpreter::HandleCommand that takes an SBExecutionContext.  That
way you can run an lldb command targeted at a particular target, thread or process w/o having to 
select same before running the command.

Also exposes CommandInterpreter::HandleCommandsFromFile to the SBCommandInterpreter API, since that
seemed generally useful.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219654 91177308-0d34-0410-b5e6-96231b3b80d8
Use PARALLEL_DIRS instead of DIRS in the Makefile
based build since the subdirectories all appear to
have no inter-directory dependencies. This speeds
up parallel makefile builds greatly.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219660 91177308-0d34-0410-b5e6-96231b3b80d8
Fix dotest.py test runner exit code to return non-zero on failure/error.

This addresses this bug:
http://www.llvm.org/bugs/show_bug.cgi?id=21267

Which has been broken since svn r215256 on Aug 8 2014.

DO NOT REVERT THIS COMMIT EVEN IF IT CREATES TEST FAILURES.

The test failures are a result of accumulation of hidden failures
that were masked by the bug this change fixes.  Most of our test
runners as part of build testing rely on dotest.py returning non-zero to indicate
some kind of errant test run.  Thus, we have been flying blind
since Aug 8 2014.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219689 91177308-0d34-0410-b5e6-96231b3b80d8
Skip asan test on FreeBSD

The build fails due to missing asan runtime in the FreeBSD base system.
Instead of marking it expected fail, just skip until we have the runtime
available.

llvm.org/pr21136


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219701 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed stdio redirection within LLDB to "do the right thing" in all cases.

The main issue was if you didn't specify all three (stdin/out/err), you would get file actions added to the launch that would always use the pseudo terminal. This is now fixed.

Also fixed the test suite test that handles IO to test redirecting things individually and all together and in other combinations to make sure we don't regress.

<rdar://problem/18638226>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219711 91177308-0d34-0410-b5e6-96231b3b80d8
When PlatformDarwinKernel::ExamineKextForMatchingUUID is given
a FileSpec, UUID, and ArchSpec, and it's opening all the kexts
with the same bundle id to see if they're a match, don't set
the Arch in the ModuleSpec.  If Module::GetObjectFile() sees
that the architecture of the kext is a mismatch for the arch
we're looking for, it'll spew a warning message to the dev (r217251).

Rely on the UUID match to get the correct file if we have
a UUID -- we'll get no warning if it's a mismatch.

<rdar://problem/18641477> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219728 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a path concatenation issue related to windows paths.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219730 91177308-0d34-0410-b5e6-96231b3b80d8
Create a process launcher abstraction.

This implements Host::LaunchProcess for windows, and in doing so
does some minor refactor to move towards a more modular process
launching design.

The original motivation for this is that launching processes on
windows needs some very windows specific code, which would live
most appropriately in source/Host/windows somewhere.  However,
there is already some common code that all platforms use when
launching a process before delegating to the platform specific
stuff, which lives in source/Host/common/Host.cpp which would
be nice to reuse without duplicating.

This commonality has been abstracted into MonitoringProcessLauncher,
a class which abstracts out the notion of launching a process using
an arbitrary algorithm, and then monitoring it for state changes.

The windows specific launching code lives in ProcessLauncherWindows,
and the posix specific launching code lives in ProcessLauncherPosix.
When launching a process MonitoringProcessLauncher is created, and
then an appropriate delegate launcher is created and given to the
MonitoringProcessLauncher.

Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D5781

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219731 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused variable.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219751 91177308-0d34-0410-b5e6-96231b3b80d8
Ensure that m_syntax is initialized in all the FileSpec
constructors.
clang static analyzer fixit.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219768 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure is_indirect local var is initialized; there 
exists a code path where it could be used while uninitialized.
clang static analyzer fixit.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219769 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unneeded local var initialization.
clang static analyzer fixit.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219770 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure local var cu is non-NULL before dereferencing.
(it was checked for NULL-ness in some places, not in others)
clang static analyzer fixit.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219771 91177308-0d34-0410-b5e6-96231b3b80d8
Be more consistent about null checks for the Process and ABI
in GetFullUnwindPlanForFrame() - the code was mostly checking
that we had an active Process and ABI but not always.
clang static analyzer fixit.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219772 91177308-0d34-0410-b5e6-96231b3b80d8
Improve the handling of kalimba ELF file section type recognition.

Recognise the SHT_NOBITS property in kalimba ELF, and determine this to be
of type zerofilled. Subsequently recognise this type to represent bytes
on the target's DATA address space, and therefore be sized accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@219782 91177308-0d34-0410-b5e6-96231b3b80d8
Merge upstream llvm.org r219782 into dev-thread-state-coordinator
Fix step commands that mix running threads and stepping threads.

This fixes https://github.com/tfiala/lldb/issues/62.