Fix the warnings introduced

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213643 91177308-0d34-0410-b5e6-96231b3b80d8
Fix an issue where an entry point of 0x00 would cause LLDB to think that the ELF is not executable without checking for ET_EXEC

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213644 91177308-0d34-0410-b5e6-96231b3b80d8
Make the test runner understand Windows command shell execution.

Currently, the test runner makes the assumption that it will run
commands through /bin/sh.  This is obviously not true on Windows,
so this patch abstracts this logic out somewhat.  Instead of
having the caller build the command string himself, the caller
will now pass in argument list of the form [[a, b], [c, d], ...]
which will get converted into a string of the form a b; c d or
a b && c d, depending on the platform.

Reviewed by: Todd Fiala

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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213669 91177308-0d34-0410-b5e6-96231b3b80d8
Dramatically improves C++ demangling performance by introducing a new implementation that is much faster than the existing demangler.  While not yet complete, the new demangler will fail gracefully when it encounters symbols it isn’t prepared to deal with.  In these cases LLDB will fall back to using the full demangler to prevent a loss in functionality.  On sizable code bases the fast path succeeds 95% of the time, providing a significant net win.

The new implementation is located in source/Core/FastDemangle.cpp.  It’s fairly straightforward C code with a few basic C++ extensions.  It should compile with little or no change on a variety of platforms, but of course it is still only useful for symbols that comply with the Itanium ABI mangling spec (plus a few Clang extensions.)

<rdar://problem/15397553> <rdar://problem/15794867>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@213671 91177308-0d34-0410-b5e6-96231b3b80d8
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
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
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