Fix execution of the CFE tests on non-x86/non-x86-64 platforms.

The tests are enabled to help maintain portability, but CFE is not
actually supported on iOS/ARM, and may need to be disabled in the
ARM build in future (eg, to save space/time).
This commit is contained in:
Landon Fuller 2013-05-06 14:51:55 -04:00
Родитель fdd9fdc976
Коммит f4e792d53c
5 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -1,6 +1,9 @@
#include <mach-o/compact_unwind_encoding.h>
#include <stddef.h>
// This file contains platform-neutral hand-assembled unwind_info tables,
// for use in testing handling of unwind info.
//
// Keep in sync with PLCrashAsyncCompactUnwindEncodingTests
#define BASE_PC 0

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -199,7 +199,13 @@
/* Initialize the CFE reader */
#if !defined(__i386__) || !defined(__x86_64__)
/* CFE is currently only supported for x86/x86-64, but our target binaries are not architecture specific;
* we fudge the type reported to the reader to allow us to test the reader on ARM anyway. */
cpu_type_t cputype = CPU_TYPE_X86;
#else
cpu_type_t cputype = _image.byteorder->swap32(_image.header.cputype);
#endif
err = plcrash_async_cfe_reader_init(&_reader, &_unwind_mobj, cputype);
STAssertEquals(err, PLCRASH_ESUCCESS, @"Failed to initialize CFE reader");