Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
zx_debug_write
摘要
將訊息寫入偵錯序列埠。
宣告
#include <zircon/syscalls.h>
zx_status_t zx_debug_write(const char* buffer, size_t buffer_size);
說明
zx_debug_write() 會嘗試將 buffer_size 位元組的資料寫入偵錯序列埠。
如要使用 zx_debug_write() 函式,您必須指定
kernel.enable-serial-syscalls=true 或
核心指令列上的 kernel.enable-serial-syscalls=output-only。
否則,函式會傳回 ZX_ERR_NOT_SUPPORTED。
「zx_debug_write」適用於診斷用途。資料可能會遭到捨棄,
但兩個不同 zx_debug_write 呼叫的資料不會被截斷
交錯或重新排序
權限
無。
傳回值
成功時會傳回 ZX_OK。
錯誤
ZX_ERR_NOT_SUPPORTED kernel.enable-serial-syscalls未設為 true
或核心指令列上的 output-only
ZX_ERR_INVALID_ARGS buffer 為空值。
另請參閱
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-25 (世界標準時間)。"],[],[]]