Added a --memory option to allow dumping the matching malloc block memory with a default format that makes sense, or that format can be overridden with the --format option.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154671 91177308-0d34-0410-b5e6-96231b3b80d8
ThreadPlanCallFunction's destructor wasn't calling DoTakedown, so if the that plan got discarded we weren't doing the takedown.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154681 91177308-0d34-0410-b5e6-96231b3b80d8
Couple more places in SBValue where you need to take the run-lock.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154683 91177308-0d34-0410-b5e6-96231b3b80d8
<rdar://problem/11193466>

Fixed an error where lldb would hang when writing memory near the end of the addres space due to an unsigned overflow.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154697 91177308-0d34-0410-b5e6-96231b3b80d8
Factor out a bunch of common code in the two ThreadPlanCallFunction constructors.  Also add a sanity check - try reading the frame, and if we fail bag out.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154698 91177308-0d34-0410-b5e6-96231b3b80d8
First step to make the test suite runnable for remote platforms.

For the types directory, we were running lldbtest.system() to execute the compiled program
on the test host to collect golden output in order to compare with the output of various
lldb debugger commands as performed later.  This won't work for the remote platform
scenario where the architecture of the target and host platforms are different.

Modify the AbstractBase class to use lldb to launch the inferior while specifying the
output file, from which the golden output is collected and grokked.  How to bootstrap and
to connect to the remote platform is still being worked at.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154699 91177308-0d34-0410-b5e6-96231b3b80d8
Added the thread ID (tid) to each packet history item and the packet history now always dumps to a lldb_private::Stream.

Enable logging the packet history when registers fail to read due to not getting the sequence mutex if "--verbose" is enabled on the log channel for the "gdb-remote" log category.

This will help us track down some issues.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154704 91177308-0d34-0410-b5e6-96231b3b80d8
The run all threads timeout in RunThreadPlan should respect the user timeout, not be arbitrarily 10 seconds (which was too long anyway...)
Also added some logging to RunThreadPlan and made others more regular.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154708 91177308-0d34-0410-b5e6-96231b3b80d8
Don't do the work in DoTakedown if the thread plan isn't valid.
Also fixed up some logging.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154709 91177308-0d34-0410-b5e6-96231b3b80d8
In debug mode, assert if we haven't initialized a mutex we thought we'd initialized.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154710 91177308-0d34-0410-b5e6-96231b3b80d8
The API lock was getting dropped too soon in GetVariables.  GetValueObjectForFrameVariable could run the target (to get dynamic values) and that requires the target lock.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154711 91177308-0d34-0410-b5e6-96231b3b80d8
Updated LLVM to take a variety of fixes to
disassembler problems:

- r153766, fixing a crash disassembling vmov
- r154628, fixing relative branches
- r154459, fixing a crash disassembling vld
- r154544, fixing a crash disassembling vst


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154722 91177308-0d34-0410-b5e6-96231b3b80d8
Patch from Viktor Kutuzov <vkutuzov@accesssoftek.com>:

Hello everyone,
 
please find the attached patch for TOT and lldb-platform-work branch, which provides the following changes:
 - fixed a crash in the ProcessPOSIX constructor when an executable module object is not yet created.
 - added support for the multi instanciated FreeBSD platform objects (the local host and remote as example).
 - enabled the remote gdb plugin on FreeBSD.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154724 91177308-0d34-0410-b5e6-96231b3b80d8
Made sure that the collections of mutexes used in
checking for LLDB mutex validity are static so
that entries put in there actually persist between
calls to error_check_mutex.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154727 91177308-0d34-0410-b5e6-96231b3b80d8
Added a --lldb option to override the location
of LLDB.framework.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154728 91177308-0d34-0410-b5e6-96231b3b80d8
Added a new host function that allows us to run shell command and get the output from them along with the status and signal:

Error
Host::RunShellCommand (const char *command,
                       const char *working_dir,
                       int *status_ptr,
                       int *signo_ptr,
                       std::string *command_output_ptr,
                       uint32_t timeout_sec);

This will allow us to use this functionality in the host lldb_private::Platform, and also use it in our lldb-platform binary. It leverages the existing code in Host::LaunchProcess and ProcessLaunchInfo.



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