Add includes needed for FreeBSD.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216000 91177308-0d34-0410-b5e6-96231b3b80d8
Refactor the hardcoded formatters facility to use sequences of lambdas - still no feature change as none are present now, but this feels cleaner. Also, hardcoded formatters do not need to be per-type, so disable caching thereof

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216004 91177308-0d34-0410-b5e6-96231b3b80d8
Fix FreeBSD build after r215992


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216021 91177308-0d34-0410-b5e6-96231b3b80d8
This is a fairly bulky patch, but a lot of it involves rearranging existing code
What it does:

- it introduces a concept of EncodingToType to the ObjCLanguageRuntime
  The ObjC runtime has a "type encoding" feature that describes types as strings
  The EncodingToType is a decoder for that format, making types out of type encoding strings
This feature already existed in some shape as we were using it to create method signatures out of the runtime, but this checkin extends the parser to support the full syntax, and moves things so that more parts of LLDB have access to this decoder

- it splits the ClassDescriptorV2 object to its own file, it was starting to grow too large

- it adds to the ClassDescriptor mechanism a notion of ivar storage; the ObjC runtime vends ivar information as well as method information
While ivar information is not ready for prime type (i.e. we don't want to add it to the runtime generated types for expression evaluator usage), there are potentially useful scenarios in which realizing ivar types could be useful. For now, the ClassDescriptor is going to hold ivar information directly. Existing code already allows describing ivars, this patch hooks those moving parts up so that one can actually ask a ClassDescriptor about ivars for the class it represents

and as a couple minor niceties:
- it makes it possible to retrieve the LLDB ClangASTContext that is associated to a clang::ASTContext
- it extends the ValueObject-to-ClassDescriptor API in the language runtime to deal correctly with base-class hierarchies



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216026 91177308-0d34-0410-b5e6-96231b3b80d8
Attempt to keep the Linux build happy in face of my changes. Non-Apple folks, can you confirm that this is good enough to keep things building for you?

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216028 91177308-0d34-0410-b5e6-96231b3b80d8
Add an accessor to ValueObject that determines if the object represents a base class, and also returns the depth of base-class-ness. For instance if one has class C : public B {} class B : public A {}, the value for A nested in B nested in C would be a base class of depth 2

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216032 91177308-0d34-0410-b5e6-96231b3b80d8
Changes uint to uint32_t.

This fixes the build broken as a result of r216026.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216034 91177308-0d34-0410-b5e6-96231b3b80d8
Move Host::GetArchitecture to HostInfo::GetArchitecture.

As a side effect, this patch also eliminates all of the
preprocessor conditionals previously used to implement
GetArchitecture().

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216074 91177308-0d34-0410-b5e6-96231b3b80d8
Fix warnings about overloaded virtual functions.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216077 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid global contstructors and place static variables inside classes as static local variables and remove the static ivars. Subclasses should use the accessor functions.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216080 91177308-0d34-0410-b5e6-96231b3b80d8
If an executable file is specified with no architecture and it contains more than one architecture select a compatible platform if all architectures match the same platform.

This helps us "do the right thing" when loading a file without having to specify an architecture. 

<rdar://problem/18021558>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216115 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Avoid global contstructors and place static variables
inside classes as static local variables and remove the static
ivars. Subclasses should use the accessor functions."

This change moved global statics to function local statics, but
forgot to make the locals static in the function, breaking all
platforms.  Furthermore, MSVC doesn't support thread-safe function
local statics, so any use of a function local static on non
primitive types is undefined behavior on MSVC.

Reverting due to the fact that it's broken on all platforms, but
would like to have a discussion about the thread-safety issue
before it goes back in.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216123 91177308-0d34-0410-b5e6-96231b3b80d8
Enable more Linux aarch64 PTRACE support for local and remote debugging.

See http://reviews.llvm.org/D4803 for more details.

Change by Paul Osmialowski.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216185 91177308-0d34-0410-b5e6-96231b3b80d8
Add software breakpoint support for Linux aarch64.

See http://reviews.llvm.org/D4969 for details.

Change by Paul Osmialowski.


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

<rdar://problem/18084105>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216189 91177308-0d34-0410-b5e6-96231b3b80d8
Fix on Linux for ReadThread lingering after inferior exits

See this email thread:
http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140818/012487.html

This patch handles the case where the inferior process exits but leaves the ReadThread in a continuous loop reading from the communication pipe.  On MacOSX, the ReadThread exits when it receives a 0 return value from the read due to EOF.  On Linux the read returns -1 and sets errno to EIO error, this does not currently cause the thread to shutdown so it continues to read from the comm.   In Communication::ReadThread I added a handler for eConnectionStatusError to disconnect and shutdown the thread.

Change by Alex Pepper.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216194 91177308-0d34-0410-b5e6-96231b3b80d8
Move Host::GetLLDBPath to HostInfo.

This continues the effort to get Host code moved over to HostInfo,
and removes many more instances of preprocessor defines along the
way.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216195 91177308-0d34-0410-b5e6-96231b3b80d8
Convert static constructors to be explicitly initialized at startup

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216197 91177308-0d34-0410-b5e6-96231b3b80d8
Move GetUsername and GetGroupname to HostInfoPosix

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@216210 91177308-0d34-0410-b5e6-96231b3b80d8
Fix compile error on Linux due to previous commit.

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