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 为 NULL。
另请参阅
  
  
  
 
  
    
    
    
  
  
  如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
  最后更新时间 (UTC):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"]],["最后更新时间 (UTC):2025-07-25。"],[],[]]