Mangled: Fix an 'unused variable' warning on GNU/Linux

Platforms which don't use LLDB's built-in demangler don't use the
'mangled_length' variable.  Instead, replace it's only use by an
expression it is equivalent to.

Differential Revision: http://reviews.llvm.org/D4625

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213681 91177308-0d34-0410-b5e6-96231b3b80d8
TypeSynthetic: Fix a pointer-to-function to void-pointer cast

reinterpret_cast may not convert a pointer-to-function to a
void-pointer.  Take a detour through intptr_t and *then* convert to a
pointer-to-function.

Differential Revision: http://reviews.llvm.org/D4627

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213682 91177308-0d34-0410-b5e6-96231b3b80d8
PluginManager: Don't cast from void-pointer to pointer-to-function

GCC warns on reinterpret_cast expressions involving a void-pointer
source and a pointer-to-function destination.  Take a detour through
intptr_t to silence it.

Differential Revision: http://reviews.llvm.org/D4626

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213691 91177308-0d34-0410-b5e6-96231b3b80d8
SBHostOS: Fix a pointer-to-function to void-pointer cast

reinterpret_cast may not convert a pointer-to-function to a
void-pointer.  Take a detour through intptr_t and *then* convert to a
pointer-to-function.

This fixes a warning emitted by GCC.

Differential Revision: http://reviews.llvm.org/D4624

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213692 91177308-0d34-0410-b5e6-96231b3b80d8
Host: Fix a pointer-to-function to void-pointer cast

reinterpret_cast may not convert a pointer-to-function to a
void-pointer.  Take a detour through intptr_t and *then* convert to a
pointer-to-function.

This silences a warning emitted by GCC when building LLDB.

Differential Revision: http://reviews.llvm.org/D4631

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213693 91177308-0d34-0410-b5e6-96231b3b80d8
ScriptInterpreterPython: %p should be used with void-pointer

printf's %p format specifier expects an argument of type void-pointer,
not type PyThreadState*.  Fix this with a static_cast.

Differential Revision: http://reviews.llvm.org/D4632

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213695 91177308-0d34-0410-b5e6-96231b3b80d8
SBCommunication: Fix a pointer-to-function to void-pointer cast

reinterpret_cast may not convert a pointer-to-function to a
void-pointer.  Take a detour through intptr_t and *then* convert to a
pointer-to-function.

This fixes a diagnostic emitted by GCC.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213696 91177308-0d34-0410-b5e6-96231b3b80d8
Enable lldb-platform exe support for Linux.

This change enables lldb-platform for Linux.  In addition, it does the following:

* fixes Host::GetLLDBPath() to work on Linux/*BSD for ePathTypeSupportExecutableDir-relative paths.

* adds more logging and comments around lldb-platform startup and remote lldb-platform usage.

* refactors lldb-platform remote-* support for Darwin and Linux into PlatformPOSIX.  This, in theory, is the bulk of what is needed for *BSD to make remote connections to lldb-platform as well (although I haven't tested that yet).  FreeBSD can make similar changes to their Platform* as was made here for PlatformLinux to pick up the rest of the bits.

* teaches GDBRemoteCommunication to use lldb-gdbserver for non-Apple hosts.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213707 91177308-0d34-0410-b5e6-96231b3b80d8
Target: silence a GCC warning

GCC emits a warning:
    warning: enumeral and non-enumeral type in conditional expression [enabled by default]
which does not seem to have a flag to control it.  Simply add an explicit cast
for the boolean value.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213715 91177308-0d34-0410-b5e6-96231b3b80d8
Plugins: silence a few more signed comparision warnings

Address a few signed-compare warnings that were triggered on GCC 4.8.2.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213716 91177308-0d34-0410-b5e6-96231b3b80d8
Merge remote-tracking branch 'upstream/master' into gsoc
Update lldb to track recent Triple arm64 enum removal and collapse into aarch64.

See the following llvm change for details:

r213743 | tnorthover | 2014-07-23 05:32:47 -0700 (Wed, 23 Jul 2014) | 9 lines
AArch64: remove arm64 triple enumerator.

This change fixes build breaks on Linux and MacOSX lldb.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213755 91177308-0d34-0410-b5e6-96231b3b80d8
Improve documentation on triple encoding expectations for qHostInfo response.

Change by Matthew Gardiner.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213756 91177308-0d34-0410-b5e6-96231b3b80d8
Add kalimba architecture checking to TestImageListMultiArchitecture

Verify that ObjectFileELF's kalimba detection works regardless
of the host platform.

Change by Matthew Gardiner.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213763 91177308-0d34-0410-b5e6-96231b3b80d8
Make sure we don't crash if someone (E.G.) comments out on entry from g_core_definitions[] without removing the ArchSpec::Core enumeration when submitting from source.

We now catch the issue with a static_assert() at compile time and use llvm::array_lengthof(g_core_definitions) as well.

<rdar://problem/17767541>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213778 91177308-0d34-0410-b5e6-96231b3b80d8
Ensure that if some unspecified person were to pass in an invalid architecture when trying to create a target, that it would fail, but not cause LLDB to crash.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213781 91177308-0d34-0410-b5e6-96231b3b80d8
Merge remote-tracking branch 'upstream/master' into gsoc
ObjectFileMachO: Silence signed/unsigned comparison warning

File::SeekFromStart returns an off_t representing the position of the
file after seeking.  This return value is always going to be one of two
values: the input or -1 in the case of failure.

ObjectFileMachO compares an expression of type off_t from the return of
File::SeekFromStart(segment.fileoff) and compares it for equality with
segment.fileoff.

The type of segment_command_64::fileoff is unsigned while off_t is
signed, comparing them emits a diagnostic under GCC.

Instead, we can just compare SeekFromSTart with -1 to see if we
successfully seeked.

Differential Revision: http://reviews.llvm.org/D4634

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213822 91177308-0d34-0410-b5e6-96231b3b80d8
Add a .clang-format file to enhance formatting experience with clang-format

clang-format is a handy tool that formats code very intelligently.  I'd
like to use it with LLDB but it requires a .clang-format file to inform
it about LLDB-specific formatting rules.

More information on these rules are here:
http://clang.llvm.org/docs/ClangFormatStyleOptions.html

Differential Revision: http://reviews.llvm.org/D4630

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213823 91177308-0d34-0410-b5e6-96231b3b80d8
Increase the gdb-remote packet timeout for the first packet we send
to the remote side (QStartNoAckMode) - it may take a little longer
than normal to get a reply.

In debugserver, hardcode the priority for several threads so they
aren't de-prioritized when a user app is using system resources.
Also, set the names of the threads.

<rdar://problem/17509866>


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