未验证 提交 0bbf4537 编写于 作者: J Jan Vorlicek 提交者: GitHub

Cleanup macos 32 bit (#66849)

* Cleanup obsolete 32 bit related macOS code

* Cleanup obsolete mac OS 32 bit stuff

I've noticed that we had some stuff in our PAL that was there from
the era of the 32 bit mac OS, so I have removed it.
上级 ad316ef6
......@@ -21,12 +21,6 @@ using namespace CorUnix;
#if HAVE_MACH_EXCEPTIONS
#if defined(HOST_64BIT)
#define MACH_EH_TYPE(x) mach_##x
#else
#define MACH_EH_TYPE(x) x
#endif // defined(HOST_AMD64)
// The vast majority of Mach calls we make in this module are critical: we cannot recover from failures of
// these methods (principally because we're handling hardware exceptions in the context of a single dedicated
// handler thread). The following macro encapsulates checking the return code from Mach methods and emitting
......@@ -87,7 +81,7 @@ struct MachExceptionInfo
{
exception_type_t ExceptionType;
mach_msg_type_number_t SubcodeCount;
MACH_EH_TYPE(exception_data_type_t) Subcodes[2];
mach_exception_data_type_t Subcodes[2];
#if defined(HOST_AMD64)
x86_thread_state_t ThreadState;
x86_float_state_t FloatState;
......@@ -115,15 +109,9 @@ public:
SET_THREAD_MESSAGE_ID = 1,
FORWARD_EXCEPTION_MESSAGE_ID = 2,
NOTIFY_SEND_ONCE_MESSAGE_ID = 71,
EXCEPTION_RAISE_MESSAGE_ID = 2401,
EXCEPTION_RAISE_STATE_MESSAGE_ID = 2402,
EXCEPTION_RAISE_STATE_IDENTITY_MESSAGE_ID = 2403,
EXCEPTION_RAISE_64_MESSAGE_ID = 2405,
EXCEPTION_RAISE_STATE_64_MESSAGE_ID = 2406,
EXCEPTION_RAISE_STATE_IDENTITY_64_MESSAGE_ID = 2407,
EXCEPTION_RAISE_REPLY_MESSAGE_ID = 2501,
EXCEPTION_RAISE_STATE_REPLY_MESSAGE_ID = 2502,
EXCEPTION_RAISE_STATE_IDENTITY_REPLY_MESSAGE_ID = 2503,
EXCEPTION_RAISE_REPLY_64_MESSAGE_ID = 2505,
EXCEPTION_RAISE_STATE_REPLY_64_MESSAGE_ID = 2506,
EXCEPTION_RAISE_STATE_IDENTITY_REPLY_64_MESSAGE_ID = 2507
......@@ -165,7 +153,7 @@ public:
thread_act_t GetThread(); // Get the faulting thread
exception_type_t GetException(); // Get the exception type (e.g. EXC_BAD_ACCESS)
int GetExceptionCodeCount(); // Get the number of exception sub-codes
MACH_EH_TYPE(exception_data_type_t) GetExceptionCode(int iIndex); // Get the exception sub-code at the given index
mach_exception_data_type_t GetExceptionCode(int iIndex); // Get the exception sub-code at the given index
// Fetch the thread state flavor from a notification or reply message (return THREAD_STATE_NONE for the
// messages that don't contain a thread state).
......@@ -224,25 +212,6 @@ private:
#pragma pack(4)
// EXCEPTION_RAISE_MESSAGE_ID
struct exception_raise_notification_t
{
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t thread_port;
mach_msg_port_descriptor_t task_port;
NDR_record_t ndr;
exception_type_t exception;
mach_msg_type_number_t code_count;
exception_data_type_t code[2];
};
// EXCEPTION_RAISE_REPLY_MESSAGE_ID
struct exception_raise_reply_t
{
NDR_record_t ndr;
kern_return_t ret;
};
// EXCEPTION_RAISE_64_MESSAGE_ID
struct exception_raise_notification_64_t
{
......@@ -262,28 +231,6 @@ private:
kern_return_t ret;
};
// EXCEPTION_RAISE_STATE_MESSAGE_ID
struct exception_raise_state_notification_t
{
NDR_record_t ndr;
exception_type_t exception;
mach_msg_type_number_t code_count;
exception_data_type_t code[2];
thread_state_flavor_t flavor;
mach_msg_type_number_t old_state_count;
natural_t old_state[THREAD_STATE_MAX];
};
// EXCEPTION_RAISE_STATE_REPLY_MESSAGE_ID
struct exception_raise_state_reply_t
{
NDR_record_t ndr;
kern_return_t ret;
thread_state_flavor_t flavor;
mach_msg_type_number_t new_state_count;
natural_t new_state[THREAD_STATE_MAX];
};
// EXCEPTION_RAISE_STATE_64_MESSAGE_ID
struct exception_raise_state_notification_64_t
{
......@@ -306,31 +253,6 @@ private:
natural_t new_state[THREAD_STATE_MAX];
};
// EXCEPTION_RAISE_STATE_IDENTITY_MESSAGE_ID
struct exception_raise_state_identity_notification_t
{
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t thread_port;
mach_msg_port_descriptor_t task_port;
NDR_record_t ndr;
exception_type_t exception;
mach_msg_type_number_t code_count;
exception_data_type_t code[2];
thread_state_flavor_t flavor;
mach_msg_type_number_t old_state_count;
natural_t old_state[THREAD_STATE_MAX];
};
// EXCEPTION_RAISE_STATE_IDENTITY_REPLY_MESSAGE_ID
struct exception_raise_state_identity_reply_t
{
NDR_record_t ndr;
kern_return_t ret;
thread_state_flavor_t flavor;
mach_msg_type_number_t new_state_count;
natural_t new_state[THREAD_STATE_MAX];
};
// EXCEPTION_RAISE_STATE_IDENTITY_64_MESSAGE_ID
struct exception_raise_state_identity_notification_64_t
{
......@@ -367,15 +289,9 @@ private:
{
set_thread_request_t set_thread;
forward_exception_request_t forward_exception;
exception_raise_notification_t raise;
exception_raise_state_notification_t raise_state;
exception_raise_state_identity_notification_t raise_state_identity;
exception_raise_notification_64_t raise_64;
exception_raise_state_notification_64_t raise_state_64;
exception_raise_state_identity_notification_64_t raise_state_identity_64;
exception_raise_reply_t raise_reply;
exception_raise_state_reply_t raise_state_reply;
exception_raise_state_identity_reply_t raise_state_identity_reply;
exception_raise_reply_64_t raise_reply_64;
exception_raise_state_reply_64_t raise_state_reply_64;
exception_raise_state_identity_reply_64_t raise_state_identity_reply_64;
......@@ -419,7 +335,7 @@ private:
void SetThread(thread_act_t thread);
void SetException(exception_type_t eException);
void SetExceptionCodeCount(int cCodes);
void SetExceptionCode(int iIndex, MACH_EH_TYPE(exception_data_type_t) iCode);
void SetExceptionCode(int iIndex, mach_exception_data_type_t iCode);
// Defined for replies:
void SetReturnCode(kern_return_t eReturnCode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册