llvm-project/lldb/lit/Modules
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
..
build-id-case.yaml Support reading section ".gnu_debugaltlink" 2018-04-29 19:47:48 +00:00
compressed-sections.yaml Support reading section ".gnu_debugaltlink" 2018-04-29 19:47:48 +00:00
elf-duplicate-section.yaml [elf] Remove one copy of the section merging code 2018-03-09 12:30:09 +00:00
elf-section-types.yaml Add support to object files for accessing the .debug_types section 2018-05-08 17:19:24 +00:00
lc_version_min.yaml Make ObjectFileMachO work on non-darwin platforms 2018-05-18 11:35:46 +00:00
lit.local.cfg