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

StartComponentTree

Resume the execution of components within the realm using a scoped BreakpointSystem. This method is idempotent.

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

Set a CapabilityProvider. Invoking this method will replace any existing provider.

When a component attempts to connect to a capability, this method can be used to mock/inject that capability.

Request

NameType
client_end CapabilityProvider

Response

NameType

ReplaceAndOpen

Replace the existing provider with the given client_end and open the existing provider with given server end.

This method is used to interpose between a client and service: Client <---> Interposer <---> Server

Opening the existing provider sets up Interposer <---> Server Replacing the existing provider sets up Client <---> Interposer

Request

NameType
client_end CapabilityProvider
server_end handle<channel>

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

STRUCTS

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.

BEFORE_START_INSTANCE 2

An instance is about to be started.

POST_DESTROY_INSTANCE 3

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

PRE_DESTROY_INSTANCE 4

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.

RESOLVE_INSTANCE 5

An instance's declaration was resolved successfully for the first time.

ROUTE_CAPABILITY 6

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

STOP_INSTANCE 7

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

TABLES

FrameworkCapability

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Describes a capability provided by the framework

OrdinalNameTypeDescription
1 scope_moniker string[100]

The moniker of the instance that this capability is scoped to.

ComponentCapability

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Describes a capability provided by a component

OrdinalNameTypeDescription
1 source_moniker string[100]

The moniker of the instance that is providing this capability.

EventPayload

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Encapsulates additional data/protocols for some event types.

OrdinalNameTypeDescription
1 routing_payload RoutingPayload

Payload for RouteCapability events

RoutingPayload

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Payload for RouteCapability events

OrdinalNameTypeDescription
1 routing_protocol RoutingProtocol

Allows setting a capability provider for RouteCapability events

2 capability_id string[50]

Identifier of capability being requested. For a path-based capability, this is the path. For a runner capability, this is the name.

3 source CapabilitySource

Source of the capability that needs to be routed.

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

XUNIONS

CapabilitySource

Defined in fuchsia.test.breakpoints/breakpoints.fidl

Describes the source of a routed capability.

NameTypeDescription
framework FrameworkCapability

The capability is provided by the framework and may be scoped down to a component.

component ComponentCapability

The capability is provided by another component.

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_ID_LENGTH 50 uint64

The maximum string length of a capability ID. This value is currently set arbitrarily.