llvm-capstone/lldb
Pavel Labath 981a34c428 Make ObjectFileMachO work on non-darwin platforms
Summary:
Before this patch we were unable to write cross-platform MachO tests
because the parsing code did not compile on other platforms. The reason
for that was that ObjectFileMachO depended on
RegisterContextDarwin_arm(64)? (presumably for core file parsing) and
the two Register Context classes uses constants from the system headers
(KERN_SUCCESS, KERN_INVALID_ARGUMENT).

As far as I can tell, these two files don't actually interact with the
darwin kernel -- they are used only in ObjectFileMachO and MacOSX-Kernel
process plugin (even though it has "kernel" in the name, this one
communicates with it via network packets and not syscalls). For the time
being I have created OS-independent definitions of these constants and
made the register context classes use those. Long term, the error
handling in these classes should be probably changed to use more
standard mechanisms such as Status or Error classes.

This is the only change necessary (apart from build system glue) to make
ObjectFileMachO work on other platforms. To demonstrate that, I remove
REQUIRES:darwin from our (only) cross-platform mach-o test.

Reviewers: jasonmolenda, aprantl, clayborg, javed.absar

Subscribers: mgorny, lldb-commits, kristof.beyls

Differential Revision: https://reviews.llvm.org/D46934

llvm-svn: 332702
2018-05-18 11:35:46 +00:00
..
cmake [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687) 2018-03-14 10:08:21 +00:00
docs Enable AUTOBRIEF in doxygen configuration. 2018-05-02 16:55:16 +00:00
examples Added a BSD archive tool. 2018-04-02 17:20:21 +00:00
include/lldb Reapply "Remove Process references from the Host module" 2018-05-15 13:42:26 +00:00
lit Make ObjectFileMachO work on non-darwin platforms 2018-05-18 11:35:46 +00:00
lldb.xcodeproj Fix the Xcode gtest target for the move of FileSpecTest.cpp. 2018-04-20 18:30:31 +00:00
lldb.xcworkspace Fix a typo in the gtest build target for Debug configuration. 2018-04-10 17:49:56 +00:00
packages/Python/lldbsuite Fix _NSCFBoolean data formatter. 2018-05-18 09:14:45 +00:00
resources Bump the lldb version # in the xcode project files from 2016-03-15 04:36:11 +00:00
scripts Add children and child[N] properties to SBValue.i. 2018-05-04 01:31:47 +00:00
source Make ObjectFileMachO work on non-darwin platforms 2018-05-18 11:35:46 +00:00
test [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
third_party/Python/module *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
tools [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
unittests Fix buildbots after it 332618 2018-05-17 17:18:11 +00:00
utils [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
www [docs] Add LLDB_TEST_USE_CUSTOM_C_COMPILER and LLDB_TEST_USE_CUSTOM_CXX_COMPILER to the build and test hmtl pages 2018-04-12 23:29:49 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.clang-format Updated .clang-format rules so bring LLDB in line with LLVM standards. 2016-09-06 17:19:00 +00:00
.gitignore [dotest] Remove crashinfo hook 2018-01-10 10:18:47 +00:00
CMakeLists.txt [CMake] Unify and relayer testing 2018-05-03 16:54:10 +00:00
CODE_OWNERS.txt Remove Sean Callanan from the CODE_OWNERS, he won't have time 2017-11-01 01:38:42 +00:00
INSTALL.txt Changed builld-llvm.py to use .json files 2017-02-23 02:21:34 +00:00
LICENSE.TXT
use_lldb_suite_root.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00