19 #ifndef __MACHINEEXCEPTIONS__
20 #define __MACHINEEXCEPTIONS__
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = power
45 #elif PRAGMA_STRUCT_PACKPUSH
47 #elif PRAGMA_STRUCT_PACK
55 struct MachineInformationPowerPC
64 unsigned long ExceptKind;
69 typedef struct MachineInformationPowerPC MachineInformationPowerPC;
70 struct RegisterInformationPowerPC
105 typedef struct RegisterInformationPowerPC RegisterInformationPowerPC;
106 struct FPUInformationPowerPC
110 unsigned long Reserved;
112 typedef struct FPUInformationPowerPC FPUInformationPowerPC;
116 vector
unsigned long v;
122 typedef union Vector128 Vector128;
123 struct VectorInformationPowerPC
125 Vector128 Registers[32];
129 typedef struct VectorInformationPowerPC VectorInformationPowerPC;
136 writeReference = kWriteReference,
137 readReference = kReadReference,
138 fetchReference = kFetchReference
141 typedef unsigned long MemoryReferenceKind;
142 struct MemoryExceptionInformation
145 LogicalAddress theAddress;
147 MemoryReferenceKind theReference;
149 typedef struct MemoryExceptionInformation MemoryExceptionInformation;
152 kUnknownException = 0,
153 kIllegalInstructionException = 1,
155 kAccessException = 3,
156 kUnmappedMemoryException = 4,
157 kExcludedMemoryException = 5,
158 kReadOnlyMemoryException = 6,
159 kUnresolvablePageFaultException = 7,
160 kPrivilegeViolationException = 8,
162 kInstructionBreakpointException = 10,
163 kDataBreakpointException = 11,
164 kIntegerException = 12,
165 kFloatingPointException = 13,
166 kStackOverflowException = 14,
168 kTaskTerminationException = 15,
169 kTaskCreationException = 16,
170 kDataAlignmentException =
178 unknownException = kUnknownException,
179 illegalInstructionException =
180 kIllegalInstructionException,
181 trapException = kTrapException,
182 accessException = kAccessException,
183 unmappedMemoryException = kUnmappedMemoryException,
184 excludedMemoryException = kExcludedMemoryException,
185 readOnlyMemoryException = kReadOnlyMemoryException,
186 unresolvablePageFaultException =
187 kUnresolvablePageFaultException,
188 privilegeViolationException =
189 kPrivilegeViolationException,
190 traceException = kTraceException,
191 instructionBreakpointException =
192 kInstructionBreakpointException,
193 dataBreakpointException = kDataBreakpointException,
194 integerException = kIntegerException,
195 floatingPointException = kFloatingPointException,
196 stackOverflowException = kStackOverflowException,
197 terminationException = kTaskTerminationException,
198 kTerminationException = kTaskTerminationException
203 typedef unsigned long ExceptionKind;
206 MemoryExceptionInformation *memoryInfo;
208 typedef union ExceptionInfo ExceptionInfo;
209 struct ExceptionInformationPowerPC
211 ExceptionKind theKind;
212 MachineInformationPowerPC *machineState;
213 RegisterInformationPowerPC *registerImage;
214 FPUInformationPowerPC *FPUImage;
216 VectorInformationPowerPC *vectorImage;
218 typedef struct ExceptionInformationPowerPC ExceptionInformationPowerPC;
219 #if TARGET_CPU_PPC || TARGET_CPU_68K
220 typedef ExceptionInformationPowerPC ExceptionInformation;
221 typedef MachineInformationPowerPC MachineInformation;
222 typedef RegisterInformationPowerPC RegisterInformation;
223 typedef FPUInformationPowerPC FPUInformation;
224 typedef VectorInformationPowerPC VectorInformation;
233 typedef CALLBACK_API_C(OSStatus, ExceptionHandlerProcPtr)(
234 ExceptionInformation *theException);
235 typedef TVECTOR_UPP_TYPE(ExceptionHandlerProcPtr) ExceptionHandlerUPP;
245 NewExceptionHandlerUPP(ExceptionHandlerProcPtr userRoutine);
246 #if !OPAQUE_UPP_TYPES
249 uppExceptionHandlerProcInfo = 0x000000F1
252 inline ExceptionHandlerUPP
253 NewExceptionHandlerUPP(ExceptionHandlerProcPtr userRoutine)
258 #define NewExceptionHandlerUPP(userRoutine) (userRoutine)
271 DisposeExceptionHandlerUPP(ExceptionHandlerUPP userUPP);
272 #if !OPAQUE_UPP_TYPES
274 inline void DisposeExceptionHandlerUPP(ExceptionHandlerUPP) {}
276 #define DisposeExceptionHandlerUPP(userUPP)
289 InvokeExceptionHandlerUPP(ExceptionInformation *theException,
290 ExceptionHandlerUPP userUPP);
291 #if !OPAQUE_UPP_TYPES
293 inline OSStatus InvokeExceptionHandlerUPP(ExceptionInformation *theException,
294 ExceptionHandlerUPP userUPP)
296 return (*userUPP)(theException);
299 #define InvokeExceptionHandlerUPP(theException, userUPP) \
300 (*userUPP)(theException)
310 #if TARGET_OS_MAC && !OPAQUE_UPP_TYPES
312 typedef ExceptionHandlerProcPtr ExceptionHandlerTPP;
315 typedef ExceptionHandlerUPP ExceptionHandlerTPP;
318 typedef ExceptionHandlerTPP ExceptionHandler;
329 InstallExceptionHandler(ExceptionHandlerTPP theHandler);
333 #if PRAGMA_STRUCT_ALIGN
334 #pragma options align = reset
335 #elif PRAGMA_STRUCT_PACKPUSH
337 #elif PRAGMA_STRUCT_PACK
341 #ifdef PRAGMA_IMPORT_OFF
Basic Macintosh data types.
struct OpaqueAreaID * AreaID
Definition: MachineExceptions.h:52
Mixed Mode Manager Interfaces.
Definition: MacTypes.h:110