fuchsia.driver.debug

Added: HEAD

PROTOCOLS

Debug

Defined in fuchsia.driver.debug/debug.fidl

Protocol for executing interactive driver debug commands.

Execute

Executes a command with the provided argument vector.

The argument vector args is passed to the driver's command handler as-is, without in-flight modification. The argument vector follows standard command-line conventions (analogous to argv), where the first argument (args[0]) is typically the command or subcommand name, followed by any flags or positional arguments.

Standard output and standard error from command execution are streamed to the provided stdout and stderr sockets. The driver or command handler writes to these sockets and closes them upon or before returning the response.

Returns the command's process exit code (exit_code), where 0 typically denotes success.

Error

Returns a zx.Status error if the execution request itself fails:

  • ZX_ERR_INVALID_ARGS: args is empty.
  • ZX_ERR_NOT_FOUND: The requested command in args[0] is unknown.

Request

NameType
args vector<string:1024>:128
stdout handle<socket>
stderr handle<socket>

Response

NameType
payload Debug_Execute_Result

ListCommands

Lists all supported commands and their descriptions.

Request

<EMPTY>

Response

NameType
payload Debug_ListCommands_Result

STRUCTS

Debug_Execute_Response

Defined in fuchsia.driver.debug/debug.fidl

FieldTypeDescriptionDefault
exit_code int32

The command's exit code, where 0 typically denotes success.

No default

Debug_ListCommands_Response

Defined in fuchsia.driver.debug/debug.fidl

FieldTypeDescriptionDefault
commands vector<CommandInfo>:64 No default

TABLES

CommandInfo

Defined in fuchsia.driver.debug/debug.fidl

Metadata for a supported command in the Debug protocol.

OrdinalFieldTypeDescription
name string:256

The name of the command.

description string:1024

A human-readable description of what the command does and its usage.

UNIONS

Debug_Execute_Result strict

Defined in fuchsia.driver.debug/debug.fidl

OrdinalVariantTypeDescription
response Debug_Execute_Response
err zx/Status
framework_err internal

Debug_ListCommands_Result strict

Defined in fuchsia.driver.debug/debug.fidl

OrdinalVariantTypeDescription
response Debug_ListCommands_Response
err zx/Status
framework_err internal

CONSTANTS

NameValueTypeDescription
MAX_ARG_COUNT 128 uint32
MAX_ARG_LENGTH 1024 uint32
MAX_COMMAND_COUNT 64 uint32
MAX_COMMAND_NAME_LENGTH 256 uint32
MAX_DESCRIPTION_LENGTH 1024 uint32