fuchsia.driver.debug

新增:HEAD

通訊協定

偵錯

定義於 fuchsia.driver.debug/debug.fidl

執行互動式驅動程式庫偵錯指令的通訊協定。

執行

使用提供的引數向量執行指令。

引數向量 args 會依原樣傳遞至驅動程式庫的指令處理常式,不會在傳輸過程中修改。引數向量遵循標準指令列慣例 (類似於 argv),其中第一個引數 (args[0]) 通常是指令或子指令名稱,後面接著任何旗標或位置引數。

指令執行作業的標準輸出內容和標準錯誤,會串流至提供的 stdout 和 stderr 通訊端。驅動程式或指令處理常式會寫入這些通訊端,並在傳回回應時或之前關閉。

傳回指令的程序結束代碼 (exit_code),其中 0 通常代表成功。

錯誤

如果執行要求本身失敗,則傳回 zx.Status 錯誤:

  • ZX_ERR_INVALID_ARGS:args 為空白。
  • ZX_ERR_NOT_FOUND:args[0] 中的要求指令不明。

要求

名稱類型
args vector<string:1024>:128
stdout handle<socket>
stderr handle<socket>

回應

名稱類型
payload Debug_Execute_Result

ListCommands

列出所有支援的指令和說明。

要求

<EMPTY>

回應

名稱類型
payload Debug_ListCommands_Result

STRUCTS

Debug_Execute_Response

定義於 fuchsia.driver.debug/debug.fidl

欄位類型說明預設
exit_code int32

指令的結束代碼,0 通常代表成功。

無預設值

Debug_ListCommands_Response

定義於 fuchsia.driver.debug/debug.fidl

欄位類型說明預設
commands vector<CommandInfo>:64 無預設值

TABLES

CommandInfo

定義於 fuchsia.driver.debug/debug.fidl

偵錯通訊協定中支援指令的中繼資料。

序數欄位類型說明
name string:256

指令名稱。

description string:1024

指令用途和用法的說明,應淺顯易懂。

UNIONS

Debug_Execute_Result strict

定義於 fuchsia.driver.debug/debug.fidl

序數Variant類型說明
response Debug_Execute_Response
err zx/Status
framework_err internal

Debug_ListCommands_Result strict

定義於 fuchsia.driver.debug/debug.fidl

序數Variant類型說明
response Debug_ListCommands_Response
err zx/Status
framework_err internal

常數

名稱值類型說明
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