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
Added gdb-remote auxv test for chunked reads.

Verifies that a sum of offset,length auxv reads
matches a single large read, and that the auxv data
extracted from them match.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211127 91177308-0d34-0410-b5e6-96231b3b80d8
Add locking around the m_owners collection in the breakpoint site.  If we are in the middle of "BreakpointLocation::ShouldStop" we don't
want other commands (like "break disable") to mutate the owners of this breakpoint out from under us.

<rdar://problem/17255589>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@211136 91177308-0d34-0410-b5e6-96231b3b80d8
Merge remote-tracking branch 'upstream/master' into gsoc