fuchsia.test.breakpoints

PROTOCOLS

BreakpointSystem

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Registers breakpoints in component manager.

SetBreakpoints

Sets breakpoints on the given EventTypes. Returns a BreakpointInvocationReceiver which can be used to expect the registered types.

Request

NameType
event_types vector<EventType>[9]
server_end request<InvocationReceiver>

Response

NameType

StartComponentManager

Begins component manager's execution. This method is a no-op when invoked more than once or by a component inside component manager.

Request

NameType

Response

NameType

InvocationReceiver

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Receives invocations for registered events in component manager.

Next

Blocks until the next invocation of a breakpoint occurs.

Note: The component manager is blocked after this call and will not be allowed to proceed until resumed explicitly via the Handler.

Request

NameType

Response

NameType
invocation Invocation

Handler

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Every Invocation supports this basic handler to allow resumption.

Resume

Resumes/unblocks from an invocation.

Request

NameType

Response

NameType

RoutingProtocol

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Allows injecting capabilities over FIDL. Used by RouteFrameworkCapability and RouteBuiltinCapability

SetProvider

Inject a CapabilityProvider in response to a routing event.

Request

NameType
client_end CapabilityProvider

Response

NameType

CapabilityProvider

Defined in fuchsia.test.breakpoints/breakpoints.fidl

A FIDL-based version of a CapabilityProvider

Open

Called to bind a server end of a channel to the provided framework capability. TODO(xbhatnag): provide all arguments (flags, mode, path) to this method.

Request

NameType
server_end handle<channel>

Response

NameType

ENUMS

EventType

Type: uint32

Defined in fuchsia.test.breakpoints/breakpoints.fidl

These EventTypes are used for the Breakpoints protocol. They are FIDL versions of the EventType enum in hooks.rs and have the same meaning.

NameValueDescription
ADD_DYNAMIC_CHILD 1

A dynamic child was added to the parent instance. Depending on its eagerness, this child may/may not be started yet.

POST_DESTROY_INSTANCE 2

An instance was destroyed successfully. The instance is stopped and no longer exists in the parent's realm.

PRE_DESTROY_INSTANCE 3

Destruction of an instance has begun. The instance may/may not be stopped by this point. The instance still exists in the parent's realm but will soon be removed. TODO(fxb/39417): Ensure the instance is stopped before this event.

ROOT_COMPONENT_RESOLVED 4

The root component instance's declaration was resolved successfully for the first time.

ROUTE_BUILTIN_CAPABILITY 5

A builtin capability is being requested by a component and requires routing. The event propagation system is used to supply the capability being requested.

ROUTE_FRAMEWORK_CAPABILITY 6

A framework capability is being requested by a component and requires routing. The event propagation system is used to supply the capability being requested.

START_INSTANCE 7

An instance was bound to. If the instance is executable, it is also started.

STOP_INSTANCE 8

An instance was stopped successfully. This event must occur before PostDestroyInstance.

USE_CAPABILITY 9

A capability was used by an instance. An instance uses a capability when it creates a channel and provides the server end to ComponentManager for routing.

TABLES

EventPayload

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Encapsulates additional data/protocols for some event types.

OrdinalNameTypeDescription
1 routing_payload RoutingPayload

Payload for RouteFrameworkCapability and RouteBuiltinCapability events

2 use_capability_payload UseCapabilityPayload

Payload for UseCapability event

RoutingPayload

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Payload for RouteFrameworkCapability and RouteBuiltinCapability events

OrdinalNameTypeDescription
1 routing_protocol RoutingProtocol

Allows setting a capability provider for RouteFrameworkCapability and RouteBuiltinCapability events

2 capability string[50]

Name/Path of a capability.

UseCapabilityPayload

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Payload for UseCapability event

OrdinalNameTypeDescription
1 capability string[50]

Name/Path of a capability

Invocation

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Contains all information about a single invocation of a breakpoint

OrdinalNameTypeDescription
1 event_type EventType

Event type corresponding to the invocation

2 target_moniker string[100]

Moniker of instance corresponding to the invocation

3 handler Handler

Handler for resuming from invocation

4 event_payload EventPayload

Optional payload for some event types

CONSTANTS

NameValueTypeDescription
MAX_NUM_EVENT_TYPES_RECEIVED 9 uint64

The maximum number of event types that a receiver can listen to. This capacity should match the actual number of event types.

MAX_MONIKER_LENGTH 100 uint64

The maximum string length of a component moniker.

MAX_CAPABILITY_LENGTH 50 uint64

The maximum string length of the name/path of a capability. This value is currently set arbitrarily.