| Index: src/trusted/service_runtime/osx/crash_filter.h
|
| ===================================================================
|
| --- src/trusted/service_runtime/osx/crash_filter.h (revision 10857)
|
| +++ src/trusted/service_runtime/osx/crash_filter.h (working copy)
|
| @@ -8,12 +8,14 @@
|
| #define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_OSX_CRASH_FILTER_H_ 1
|
|
|
|
|
| -#include <mach/port.h>
|
| +#include <mach/mach.h>
|
|
|
| #include "native_client/src/include/nacl_base.h"
|
|
|
| EXTERN_C_BEGIN
|
|
|
| +#if NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86
|
| +
|
| /*
|
| * This function is intended for use by Chromium's embedding of
|
| * Breakpad crash reporting. Given the Mach port for a thread in this
|
| @@ -23,7 +25,24 @@
|
| */
|
| int NaClMachThreadIsInUntrusted(mach_port_t thread_port);
|
|
|
| +/*
|
| + * The internal implementation of NaClMachThreadIsInUntrusted. This function
|
| + * may be called by Native Client's own Mach exception handler to determine
|
| + * whether an exception occurred in untrusted code.
|
| + *
|
| + * Determining whether code is untrusted, for the purposes of this function,
|
| + * considers only the executing code based on the code segment (x86-32) or
|
| + * instruction pointer (x86-64). This is sufficient for determining whether
|
| + * the executing code is untrusted. Callers that are concerned that trusted
|
| + * code may have jumped to untrusted code may also want to consider
|
| + * natp->suspend_state before deciding how to proceed.
|
| + */
|
| +int NaClMachThreadStateIsInUntrusted(x86_thread_state_t *state,
|
| + size_t nacl_thread_index);
|
| +
|
| +#endif /* NACL_ARCH(NACL_BUILD_ARCH) */
|
| +
|
| EXTERN_C_END
|
|
|
|
|
| -#endif
|
| +#endif /* NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_OSX_CRASH_FILTER_H_ */
|
|
|