thread state coordinator: replaced shortened type name Func suffix with Function.

ThreadIDFunc => ThreadIDFunction
LogFunc      => LogIDFunction

We try to avoid abbreviations/shortened names.  Adjusted function parameter names
as well to replace _func with _function.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218773 91177308-0d34-0410-b5e6-96231b3b80d8
Add a new SBExecutionContext class that wraps an ExecutionContextRef. This class is a convenient way at the API level to package a target,process,thread and frame all together - or just a subset of those

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218808 91177308-0d34-0410-b5e6-96231b3b80d8
Add an accessor to PyCallable that allows one to determine the count of arguments that a Python function allows, and whether varargs/kwargs are also accepted by the same function

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218812 91177308-0d34-0410-b5e6-96231b3b80d8
[cmake] Include the new file in the CMake lists. Without this every
CMake build of any part of LLVM with LLDB checked out fails immediately.
=[

We appear to not even have a build bot covering the CMake build of LLDB
which makes this truly terrible. That needs to be fixed immediately.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218831 91177308-0d34-0410-b5e6-96231b3b80d8
thread state coordinator: added error callbacks, cleaned up tests.

ThreadStateCoordinator changes:
* Most commands that run in the queue now take an error handler that
  will be called with an error string if an error occurs during processing.
  Errors generally stop the operation in progress.  The errors are checked
  at time of execution.  This is intended to help flush out ptrace/waitpid/state management
  issues as quickly as possible.

* Threads now must be known to the coordinator before stops can be reported,
  resumes can be requested, thread deaths can be reported, or deferred stop
  notifications can be made.  Failure to know the thread will cause the coordinator
  to call the error callback for the event being processed.  Threads are introduced
  to the system by the NotifyThreadCreate method.
  
* The NotifyThreadCreate method now takes the initial state of the thread being
  introduces to the system.  We no longer just assume the thread is running.
  
The test cases were cleaned up, too:
* A gtest test fixture is now used, which allows creating less verbose helper
  methods that setup common pieces of callback code for some method invocations.
  Net result: the tests are simpler to read and shorter to write.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218833 91177308-0d34-0410-b5e6-96231b3b80d8
Allow Python commands to optionally take an SBExecutionContext argument in case they need to handle 'where they want to act' separately from the notion of 'currently-selected entity' that is associated to the debugger. Do this in an (hopefully) non-breaking way by running an argcount check before passing in the new argument. Update the test case to also check for this new feature. www update to follow

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218834 91177308-0d34-0410-b5e6-96231b3b80d8
Add documentation about the new SBExecutionContext for Python commands feature. This marks the end of rdar://18142728

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218835 91177308-0d34-0410-b5e6-96231b3b80d8
Add SBExecutionContext.cpp to this file as well, as the comment
in source/API/CMakeLists.txt instructs...


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


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218844 91177308-0d34-0410-b5e6-96231b3b80d8
Add a mutex lock to StackFrame to protect race conditions for
updating its ivars.  We've had a lot of crash reports and careful
analysis shows that we've got multiple threads operating on the
same StackFrame objects, changing their m_sc and m_flags ivars.
<rdar://problem/18406111> 


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218845 91177308-0d34-0410-b5e6-96231b3b80d8
Add SBExecutionContext.h to the list of headers to copy into the LLDB framework.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218850 91177308-0d34-0410-b5e6-96231b3b80d8
Add a couple of extra exepct strings so this test file keeps in sync with lldb
a little better.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218851 91177308-0d34-0410-b5e6-96231b3b80d8
Update to match strings output by lldb.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218853 91177308-0d34-0410-b5e6-96231b3b80d8
gtest runner: now always does a clean step after running.

* Checks for any 'clean' arg, setting clean-only mode.
* If clean-only mode, skip the make.
* Adds the equivalent of os.devnull in a way that supports the file-like 'write' operation.
* Uses a null sysout/syserr for the clean step so we don't see noise from cleaning.
* Now always runs the clean step after a real test run so we don't have cruft left over after a test run.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218871 91177308-0d34-0410-b5e6-96231b3b80d8
thread state coordinator: requesting resume now signals error appropriately.

Added tests to verify that the coordinator signals an error if
the given thread to resume is unknown, and if the thread is through to
be running already.

Modified resume handling code to match tests.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218872 91177308-0d34-0410-b5e6-96231b3b80d8
Fix up stale comments from last change.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218873 91177308-0d34-0410-b5e6-96231b3b80d8
Fix codesigning of MacOSX debugserver when built with cmake.

This patch fixes the codesigning of debugserver on OSX when built with
cmake.  Without this you get this error when debugging:
    error: process launch failed: unable to locate debugserver

Note: you also need to set LLDB_DEBUGSERVER_PATH to point to your built debugserver.
e.g. export LLDB_DEBUGSERVER_PATH=`pwd`/bin/debugserver

Change by dawn@burble.org.

Tested on MacOSX 10.9.5 and Xcode 6.1 Beta using cmake/ninja.
Verified no build break on Linux Ubuntu cmake/ninja and Xcode 6.1 canonical build.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218890 91177308-0d34-0410-b5e6-96231b3b80d8
Merge upstream llvm.org r218890 into dev-llgs-local-launch