Unused functions break the -Werror build. Revert for now.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217900 91177308-0d34-0410-b5e6-96231b3b80d8
Fixed an issue where the last N load commands in the mach-o core file would not be read in where N was the number of LC_THREAD load commands.

I now properly increment the ncmds for each LC_THREAD and now core files are saved correctly.

<rdar://problem/18312703> 

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217905 91177308-0d34-0410-b5e6-96231b3b80d8
More categories could be added, and having an explicit list in this test case is a fairly bullet-proof recipe for disaster. Use the * enabling feature to workaround this. Fixes rdar://18358649

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217927 91177308-0d34-0410-b5e6-96231b3b80d8
Build lldb-mi on all platforms with Makefile builds

CMake builds already do so.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217931 91177308-0d34-0410-b5e6-96231b3b80d8
If a new platform is created/selected for an architecture, make it the selected platform so you can do things like:
% lldb ios-executable
(lldb) platform connect connect://localhost:11111

Prior to this fix, the host platform would be selected even though the target was using the ios-remote platform.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217963 91177308-0d34-0410-b5e6-96231b3b80d8
Retry remote connection one time in case of timeout and return an error that specifies why debugging failed.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217998 91177308-0d34-0410-b5e6-96231b3b80d8
Listen to the return value of the Platform::WriteFile() call within PlatformPOSIX::PutFile() in case we write less than we wanted to. Also adjust the input stream's offset in such cases.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217999 91177308-0d34-0410-b5e6-96231b3b80d8
Add better logging for the "$vFile:pwrite:" packet so we can show binary data instead of nothing or unprintable characters. This can easily be extended for other packets that have binary data.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218000 91177308-0d34-0410-b5e6-96231b3b80d8
Hex encode the triple values in case they contain special characters.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218001 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the ability of "lldb-platform" to upload files.

The issue was GDBRemoteCommunication::CheckForPacket() already fixes up any prefixed bytes (0x7d followed by value that is XOR'ed with 0x20). If we do this again, we cause binary packets to lose bytes.

This allows lldb-platform to be able to upload binaries and debug them remotely.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218002 91177308-0d34-0410-b5e6-96231b3b80d8
llgs: removed some wait-for-stop code in inferior process launch pipeline.

The $A handler was unnecessarily waiting for the launched app to hit a stop
before returning.  Removed this code.

Renamed the llgs inferior launching code to LaunchProcessForDebugging ()
to prevent it from possibly being mistaken as code that lldb-platform uses
to launch a debugserver process.  We probably want to look at breaking out
llgs-specific and lldb-platform-specific code into separate derived classes,
with common code in a shared base class.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218075 91177308-0d34-0410-b5e6-96231b3b80d8
Add some tests to be skipped when run remotely and also fixed a test to be more reliable when it comes to stopping on a specific line.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218079 91177308-0d34-0410-b5e6-96231b3b80d8
Extend the member function discovery APIs to also support Objective-C as well as C++

For the Objective-C case, we do not have a "function type" notion, so we actually end up wrapping the clang ObjCMethodDecl in the Impl object, and ask function-y questions of it
In general, you can always ask for return type, number of arguments, and type of each argument using the TypeMemberFunction layer - but in the C++ case, you can also acquire a Type object for the function itself, which instead you can't do in the Objective-C case



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218132 91177308-0d34-0410-b5e6-96231b3b80d8
Fix typo in Linux ASLR logging.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218133 91177308-0d34-0410-b5e6-96231b3b80d8
Adds two new functions to SBTarget FindGlobalVariables and FindGlobalFunctions that lets you search by name, by regular expression and by starts with. 

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218140 91177308-0d34-0410-b5e6-96231b3b80d8
Test suite runs better again after recent fixes that would select a platform if a "file a.out" auto selected a different platform than the selected one.

Changes include:
- fix it so you can select the "host" platform using "platform select host"
- change all callbacks that create platforms to returns shared pointers
- fix TestImageListMultiArchitecture.py to restore the "host" platform by running "platform select host"
- Add a new "PlatformSP Platform::Find(const ConstString &name)" method to get a cached platform
- cache platforms that are created and re-use them instead of always creating a new one



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218145 91177308-0d34-0410-b5e6-96231b3b80d8
Fix for 218140 for SBTarget.i, the added functions were in the wrong class definition

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218147 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure to #include <atomic> when using std::atomic.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218148 91177308-0d34-0410-b5e6-96231b3b80d8
We had to squirrel away the dyld module before doing ResolveExecutableModule, since
that would clear the module list, and then put it back by hand.  But we forgot to 
also put its sections back in the target SectionList, so we would jettison it as
unloaded when we finished handling the first real load event.  Add its sections.

<rdar://problem/18385947>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@218156 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a thinko in how the RemoteiOS Platform looked up files in the SDK & other
platform locations.  We didn't always do an exhaustive search through all the 
platform locations, so we would have to read some files out of memory even though
they existed in the exploded shared cache or SDK.

<rdar://problem/18385947>


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