summaryrefslogtreecommitdiffstats
path: root/third_party/rust/minidump-common/src
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/minidump-common/src')
-rw-r--r--third_party/rust/minidump-common/src/errors/macos.rs25
-rw-r--r--third_party/rust/minidump-common/src/format.rs24
2 files changed, 44 insertions, 5 deletions
diff --git a/third_party/rust/minidump-common/src/errors/macos.rs b/third_party/rust/minidump-common/src/errors/macos.rs
index d27c772e2a..667bb3919c 100644
--- a/third_party/rust/minidump-common/src/errors/macos.rs
+++ b/third_party/rust/minidump-common/src/errors/macos.rs
@@ -330,7 +330,7 @@ pub enum ExceptionCodeMacResourceThreadsFlavor {
///
/// See the [osfmk/kern/exc_guard.h][header] header in Apple's kernel sources
///
-/// [header]: https://github.com/apple/darwin-xnu/blob/main/osfmk/kern/exc_guard.h
+/// [header]: https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/kern/exc_guard.h
#[derive(Copy, Clone, PartialEq, Eq, Debug, FromPrimitive)]
pub enum ExceptionCodeMacGuardType {
GUARD_TYPE_NONE = 0,
@@ -339,18 +339,21 @@ pub enum ExceptionCodeMacGuardType {
GUARD_TYPE_USER = 3,
GUARD_TYPE_VN = 4,
GUARD_TYPE_VIRT_MEMORY = 5,
+ GUARD_TYPE_REJECTED_SC = 6,
}
/// Mac/iOS Mach port guard exception flavors
///
/// See the [osfmk/mach/port.h][header] header in Apple's kernel sources
///
-/// [header]: https://github.com/apple/darwin-xnu/blob/main/osfmk/mach/port.h
+/// [header]: https://github.com/apple-oss-distributions/xnu/blob/main/osfmk/mach/port.h
#[derive(Copy, Clone, PartialEq, Eq, Debug, FromPrimitive)]
pub enum ExceptionCodeMacGuardMachPortFlavor {
- GUARD_EXC_DESTROY = 0x00000001,
- GUARD_EXC_MOD_REFS = 0x00000002,
- GUARD_EXC_SET_CONTEXT = 0x00000004,
+ GUARD_EXC_DESTROY = 1,
+ GUARD_EXC_MOD_REFS = 2,
+ GUARD_EXC_INVALID_OPTIONS = 3,
+ GUARD_EXC_SET_CONTEXT = 4,
+ GUARD_EXC_THREAD_SET_STATE = 5,
GUARD_EXC_UNGUARDED = 0x00000008,
GUARD_EXC_INCORRECT_GUARD = 0x00000010,
GUARD_EXC_IMMOVABLE = 0x00000020,
@@ -371,6 +374,8 @@ pub enum ExceptionCodeMacGuardMachPortFlavor {
GUARD_EXC_RCV_GUARDED_DESC = 0x00100000,
GUARD_EXC_MOD_REFS_NON_FATAL = 0x00200000,
GUARD_EXC_IMMOVABLE_NON_FATAL = 0x00400000,
+ GUARD_EXC_REQUIRE_REPLY_PORT_SEMANTICS = 0x00800000,
+ GUARD_EXC_EXCEPTION_BEHAVIOR_ENFORCE = 0x01000000,
}
/// Mac/iOS fd guard exception flavors
@@ -414,3 +419,13 @@ pub enum ExceptionCodeMacGuardVNFlavor {
pub enum ExceptionCodeMacGuardVirtMemoryFlavor {
GUARD_EXC_DEALLOC_GAP = 0x00000001,
}
+
+/// Mac/iOS rejected syscall guard exception flavors
+///
+/// See the [osfmk/kern/exc_guard.h][header] header in Apple's kernel sources
+///
+/// [header]: https://github.com/apple-oss-distributions/xnu/blob/1031c584a5e37aff177559b9f69dbd3c8c3fd30a/osfmk/kern/exc_guard.h#L149-L163
+#[derive(Copy, Clone, PartialEq, Eq, Debug, FromPrimitive)]
+pub enum ExceptionCodeMacGuardRejecteSysCallFlavor {
+ GUARD_EXC_MACH_TRAP = 0x00000000,
+}
diff --git a/third_party/rust/minidump-common/src/format.rs b/third_party/rust/minidump-common/src/format.rs
index 2b610ef559..d6a8f629b5 100644
--- a/third_party/rust/minidump-common/src/format.rs
+++ b/third_party/rust/minidump-common/src/format.rs
@@ -2552,3 +2552,27 @@ pub struct MINIDUMP_HANDLE_DATA_STREAM {
/// Reserved for future use; must be zero.
pub reserved: u32,
}
+
+#[derive(Debug, Clone, Pread, Pwrite, SizeWith)]
+pub struct MINIDUMP_THREAD_INFO {
+ /// Thread identifier
+ pub thread_id: u32,
+ /// Thread state flags
+ pub dump_flags: u32,
+ /// HRESULT value of dump status
+ pub dump_error: u32,
+ /// The thread's exit code
+ pub exit_status: u32,
+ /// UTC time the thread was created
+ pub create_time: u64,
+ /// UTC time the thread exited
+ pub exit_time: u64,
+ /// Time executed in kernel mode
+ pub kernel_time: u64,
+ /// Time executed in user mode
+ pub user_time: u64,
+ /// Start address of the thread
+ pub start_address: u64,
+ /// Processor affinity mask
+ pub affinity: u64,
+}