fuchsia.exception

PROTOCOLS

Handler

Defined in fuchsia.exception/handler.fidl

Protocol meant for clients interested in handling exceptions for a particular service.

OnException

This exception mirrors closely the information provided by exception channels. The design is to have clients of this API behave as closely as possible to native exception handlers that are listening to an exception channel.

exception is an exception handle, which controls the exception's lifetime. See exception zircon docs for more information.

info represents basic exception information as provided by the exception channel.

Request

NameType
exception handle<exception>
info ExceptionInfo

Response

NameType

ProcessLimbo

Defined in fuchsia.exception/process_limbo.fidl

Protocol meant for clients interested in obtaining processes that are suspended waiting for an exception handler (in limbo). This is the core feature that enables Just In Time (JIT) debugging.

ListProcessesWaitingOnException

Returns information on all the processes currently waiting on an exception. The information provided is intended to correctly identify an exception and determine whether the caller wants to actually handle it. To retrieve an exception, use the |GetException| call.

NOTE: The |process| and |thread| handle will only have the ZX_RIGHT_READ right, so no modification will be able to be done on them.

Request

NameType

Response

NameType
exception_list vector<ProcessExceptionMetadata>[32]

RetrieveException

Removes the process from limbo and retrieves the exception handle and associated metadata from an exception.

Use |ListProcessesWaitingOnException| to choose a |process_koid| from the list of available exceptions.

Returns ZX_ERR_NOT_FOUND if the process is not waiting on an exception.

Request

NameType
process_koid uint64

Response

NameType
result ProcessLimbo_RetrieveException_Result

STRUCTS

ExceptionInfo

Defined in fuchsia.exception/handler.fidl

Basic exception information associated with a particular exception. Maps to zx_exception_info_t.

NameTypeDescriptionDefault
process_koid uint64 No default
thread_koid uint64 No default
type ExceptionType No default

ProcessLimbo_RetrieveException_Response

generated

NameTypeDescriptionDefault
process_exception ProcessException No default

ENUMS

ExceptionType

Type: uint32

Defined in fuchsia.exception/handler.fidl

What type of exception was triggered. Maps to the types defined in zx_excp_type_t. If zircon/syscalls/exception.h changes, this needs to be updates as well to reflect that.

NameValueDescription
GENERAL 8
FATAL_PAGE_FAULT 264
UNDEFINED_INSTRUCTION 520
SW_BREAKPOINT 776
HW_BREAKPOINT 1032
UNALIGNED_ACCESS 1288
THREAD_STARTING 32776
THREAD_EXITING 33032
POLICY_ERROR 33288
PROCESS_STARTING 33544

TABLES

ProcessException

Defined in fuchsia.exception/handler.fidl

Generic wrapper over a thread exception. Mirrors closely the information given by an exception channel.

OrdinalNameTypeDescription
1 exception handle<exception>
2 info ExceptionInfo
3 process handle<process>
4 thread handle<thread>

ProcessExceptionMetadata

Defined in fuchsia.exception/process_limbo.fidl

Intended to be read only metadada associated with an exception waiting in limbo. The handles provided will only have read-only access to the resource, so no modification can be done to them.

NOTE: Both |process| and |thread| will be valid if present.

OrdinalNameTypeDescription
1 info ExceptionInfo
2 process handle<process> Only has ZX_RIGHT_READ and ZX_RIGHT_GET_PROPERTY rights.
3 thread handle<thread> The thread that generated the exception. The process may have other threads that are not reflected here. Only has ZX_RIGHT_READ and ZX_RIGHT_GET_PROPERTY rights.

UNIONS

ProcessLimbo_RetrieveException_Result

generated

NameTypeDescription
response ProcessLimbo_RetrieveException_Response
err int32

CONSTANTS

NameValueTypeDescription
MAX_EXCEPTIONS_PER_CALL 32 uint64 The maximum amount of exceptions that will be listed at any given time by a call to |ListProcessesWaitingOnException|.