Initial commit

This commit is contained in:
alexpete
2021-03-05 11:26:34 -08:00
commit a10351f38d
27091 changed files with 5521199 additions and 0 deletions
@@ -0,0 +1,62 @@
// Copyright 2014 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CRASHPAD_COMPAT_MAC_AVAILABILITYMACROS_H_
#define CRASHPAD_COMPAT_MAC_AVAILABILITYMACROS_H_
#include_next <AvailabilityMacros.h>
// 10.7 SDK
#ifndef MAC_OS_X_VERSION_10_7
#define MAC_OS_X_VERSION_10_7 1070
#endif
// 10.8 SDK
#ifndef MAC_OS_X_VERSION_10_8
#define MAC_OS_X_VERSION_10_8 1080
#endif
// 10.9 SDK
#ifndef MAC_OS_X_VERSION_10_9
#define MAC_OS_X_VERSION_10_9 1090
#endif
// 10.10 SDK
#ifndef MAC_OS_X_VERSION_10_10
#define MAC_OS_X_VERSION_10_10 101000
#endif
// 10.11 SDK
#ifndef MAC_OS_X_VERSION_10_11
#define MAC_OS_X_VERSION_10_11 101100
#endif
// 10.12 SDK
#ifndef MAC_OS_X_VERSION_10_12
#define MAC_OS_X_VERSION_10_12 101200
#endif
// 10.13 SDK
#ifndef MAC_OS_X_VERSION_10_13
#define MAC_OS_X_VERSION_10_13 101300
#endif
#endif // CRASHPAD_COMPAT_MAC_AVAILABILITYMACROS_H_
@@ -0,0 +1,76 @@
// Copyright 2015 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CRASHPAD_COMPAT_MAC_KERN_EXC_RESOURCE_H_
#define CRASHPAD_COMPAT_MAC_KERN_EXC_RESOURCE_H_
#if __has_include_next(<kern/exc_resource.h>)
#include_next <kern/exc_resource.h>
#endif
// 10.9 SDK
#ifndef EXC_RESOURCE_DECODE_RESOURCE_TYPE
#define EXC_RESOURCE_DECODE_RESOURCE_TYPE(code) (((code) >> 61) & 0x7ull)
#endif
#ifndef EXC_RESOURCE_DECODE_FLAVOR
#define EXC_RESOURCE_DECODE_FLAVOR(code) (((code) >> 58) & 0x7ull)
#endif
#ifndef RESOURCE_TYPE_CPU
#define RESOURCE_TYPE_CPU 1
#endif
#ifndef RESOURCE_TYPE_WAKEUPS
#define RESOURCE_TYPE_WAKEUPS 2
#endif
#ifndef RESOURCE_TYPE_MEMORY
#define RESOURCE_TYPE_MEMORY 3
#endif
#ifndef FLAVOR_CPU_MONITOR
#define FLAVOR_CPU_MONITOR 1
#endif
#ifndef FLAVOR_WAKEUPS_MONITOR
#define FLAVOR_WAKEUPS_MONITOR 1
#endif
#ifndef FLAVOR_HIGH_WATERMARK
#define FLAVOR_HIGH_WATERMARK 1
#endif
// 10.10 SDK
#ifndef FLAVOR_CPU_MONITOR_FATAL
#define FLAVOR_CPU_MONITOR_FATAL 2
#endif
// 10.12 SDK
#ifndef RESOURCE_TYPE_IO
#define RESOURCE_TYPE_IO 4
#endif
#ifndef FLAVOR_IO_PHYSICAL_WRITES
#define FLAVOR_IO_PHYSICAL_WRITES 1
#endif
#ifndef FLAVOR_IO_LOGICAL_WRITES
#define FLAVOR_IO_LOGICAL_WRITES 2
#endif
#endif // CRASHPAD_COMPAT_MAC_KERN_EXC_RESOURCE_H_
@@ -0,0 +1,32 @@
// Copyright 2014 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CRASHPAD_COMPAT_MAC_MACH_O_LOADER_H_
#define CRASHPAD_COMPAT_MAC_MACH_O_LOADER_H_
#include_next <mach-o/loader.h>
// 10.7 SDK
#ifndef S_THREAD_LOCAL_ZEROFILL
#define S_THREAD_LOCAL_ZEROFILL 0x12
#endif
// 10.8 SDK
#ifndef LC_SOURCE_VERSION
#define LC_SOURCE_VERSION 0x2a
#endif
#endif // CRASHPAD_COMPAT_MAC_MACH_O_LOADER_H_
@@ -0,0 +1,28 @@
// Copyright 2017 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CRASHPAD_COMPAT_MAC_MACH_I386_THREAD_STATE_H_
#define CRASHPAD_COMPAT_MAC_MACH_I386_THREAD_STATE_H_
#include_next <mach/i386/thread_state.h>
// 10.13 SDK
//
// This was defined as 244 in the 10.7 through 10.12 SDKs, and 144 previously.
#if I386_THREAD_STATE_MAX < 614
#undef I386_THREAD_STATE_MAX
#define I386_THREAD_STATE_MAX (614)
#endif
#endif // CRASHPAD_COMPAT_MAC_MACH_I386_THREAD_STATE_H_
@@ -0,0 +1,120 @@
// Copyright 2014 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CRASHPAD_COMPAT_MAC_MACH_MACH_H_
#define CRASHPAD_COMPAT_MAC_MACH_MACH_H_
#include_next <mach/mach.h>
// <mach/exception_types.h>
// 10.8 SDK
#ifndef EXC_RESOURCE
#define EXC_RESOURCE 11
#endif
#ifndef EXC_MASK_RESOURCE
#define EXC_MASK_RESOURCE (1 << EXC_RESOURCE)
#endif
// 10.9 SDK
#ifndef EXC_GUARD
#define EXC_GUARD 12
#endif
#ifndef EXC_MASK_GUARD
#define EXC_MASK_GUARD (1 << EXC_GUARD)
#endif
// 10.11 SDK
#ifndef EXC_CORPSE_NOTIFY
#define EXC_CORPSE_NOTIFY 13
#endif
#ifndef EXC_MASK_CORPSE_NOTIFY
#define EXC_MASK_CORPSE_NOTIFY (1 << EXC_CORPSE_NOTIFY)
#endif
// Dont expose EXC_MASK_ALL at all, because its definition varies with SDK, and
// older kernels will reject values that they dont understand. Instead, use
// crashpad::ExcMaskAll(), which computes the correct value of EXC_MASK_ALL for
// the running system.
#undef EXC_MASK_ALL
#if defined(__i386__) || defined(__x86_64__)
// <mach/i386/exception.h>
// 10.11 SDK
#if EXC_TYPES_COUNT > 14 // Definition varies with SDK
#error Update this file for new exception types
#elif EXC_TYPES_COUNT != 14
#undef EXC_TYPES_COUNT
#define EXC_TYPES_COUNT 14
#endif
// <mach/i386/thread_status.h>
// 10.6 SDK
//
// Earlier versions of this SDK didnt have AVX definitions. They didnt appear
// until the version of the 10.6 SDK that shipped with Xcode 4.2, although
// versions of this SDK appeared with Xcode releases as early as Xcode 3.2.
// Similarly, the kernel didnt handle AVX state until Mac OS X 10.6.8
// (xnu-1504.15.3) and presumably the hardware-specific versions of Mac OS X
// 10.6.7 intended to run on processors with AVX.
#ifndef x86_AVX_STATE32
#define x86_AVX_STATE32 16
#endif
#ifndef x86_AVX_STATE64
#define x86_AVX_STATE64 17
#endif
// 10.8 SDK
#ifndef x86_AVX_STATE
#define x86_AVX_STATE 18
#endif
// 10.13 SDK
#ifndef x86_AVX512_STATE32
#define x86_AVX512_STATE32 19
#endif
#ifndef x86_AVX512_STATE64
#define x86_AVX512_STATE64 20
#endif
#ifndef x86_AVX512_STATE
#define x86_AVX512_STATE 21
#endif
#endif // defined(__i386__) || defined(__x86_64__)
// <mach/thread_status.h>
// 10.8 SDK
#ifndef THREAD_STATE_FLAVOR_LIST_10_9
#define THREAD_STATE_FLAVOR_LIST_10_9 129
#endif
#endif // CRASHPAD_COMPAT_MAC_MACH_MACH_H_
@@ -0,0 +1,26 @@
// Copyright 2015 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CRASHPAD_COMPAT_MAC_SYS_RESOURCE_H_
#define CRASHPAD_COMPAT_MAC_SYS_RESOURCE_H_
#include_next <sys/resource.h>
// 10.9 SDK
#ifndef WAKEMON_MAKE_FATAL
#define WAKEMON_MAKE_FATAL 0x10
#endif
#endif // CRASHPAD_COMPAT_MAC_SYS_RESOURCE_H_