Don't allow two threads to create/use the section list before it has been fully populated.

<rdar://problem/16937203>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211043 91177308-0d34-0410-b5e6-96231b3b80d8
Correctly classify code sections as code sections by using the S_ATTR_PURE_INSTRUCTIONS and S_ATTR_SOME_INSTRUCTIONS section flags.

Also correctly set the symbol type of symbols for S_REGULAR and other section types.

<rdar://problem/16896734>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211073 91177308-0d34-0410-b5e6-96231b3b80d8
Don't hardcode path to codesign_allocate.

Building OS X debugserver assumes you have an Xcode installation at /Application/Xcode.app. Let's instead detect where Xcode is using xcrun.

See http://reviews.llvm.org/D4152





git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211074 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid crashing on invalid or unreadable ELF core

Issue discovered during the GSoC 2014 project implementing FreeBSD
kernel support.  The existing elf-core Process plugin crashed trying
to read from /dev/mem (the kernel memory device).

Patch by Mike Ma.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211102 91177308-0d34-0410-b5e6-96231b3b80d8
Added gdb-remote auxv tests.

First batch of auxv-related tests from llgs branch.

Includes helpers for unescaping gdb-remote binary-escaped
data, converting binary data from inferior endian-ness to
integral values, etc.

Tests on debugserver are expected to be skipped since it
doesn't support auxv and the tests are geared to be skipped
on platforms that don't broadcast support for the feature
in qSupported.  (llgs is listed as XFAIL since qSupported
support in llgs upstream is not there, so the support check
cannot work in upstream llgs.)


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211105 91177308-0d34-0410-b5e6-96231b3b80d8
Fix up lldb cmake linker flags for MacOSX.

Change r210035 broke the Darwin cmake build.  The
initial change was intended to stop the --start-group/--end-group
linker flags from being passed to non-gcc/clang-looking compilers,
stopping MSVC from warning on linking.  That change, however,
caused MacOSX cmake-based builds to start using the --start-group/
--end-group flags, even though the MacOSX linker doesn't support
them.  That broke the MacOSX clang build.

The fix keeps the newer check for a gcc-compatible compiler, but
specifically excludes MacOSX.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211123 91177308-0d34-0410-b5e6-96231b3b80d8
Those were not the right defines for memory errors, and the right defines aren't
available.  So going back to a generic error instead.

<rdar://problem/17058708>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211124 91177308-0d34-0410-b5e6-96231b3b80d8
Merge upstream llvm.org r211124 into dev-tfiala-native-protocol-linux-x86_64

Conflicts:
	test/tools/lldb-gdbserver/TestGdbRemoteAuxvSupport.py