如何使用 logcat 以本机代码打印(或转储)包裹
How can I print(or dump) a Parcel in native code, use logcat?
我们知道 android 在 c++ 和 java 中都有一个类 Parcel,现在我需要使用 logcat 来监视本机代码中的 parcel 对象,如下所示:
Parcel p;
p.writeInt32(...);
p.writeInt32(...);
...
// need to log parcel data here
LOGD(...);
我该怎么做?我发现Parcel有一个成员函数print(TextOutput&to,uint32_t标志),但我不知道用法...请帮帮我!!
Parcel
有一个 marshall() 方法,该方法返回 Parcel 内容的字节数组。
相关文章:
- 分段故障(堆芯转储)矢量
- Cppcheck生成xml转储文件
- 如何找出GDB的SIGTRAP核心转储的根本原因
- C++映射分割错误(核心转储)
- 在c++中初始化矩阵时出现分段错误(核心转储)
- 在c++中键入向量中的所有值后,得到分段错误(核心转储)
- 浮点异常(核心转储)#694457
- 分段错误(核心转储)但无法弄清楚
- 链接到libkcapi时没有核心转储
- 检测到堆栈粉碎:已终止 中止(核心已转储)
- 正在处理故障(堆芯转储)
- 分段错误(核心转储) - 使用 SavedModel 的 Tensorflow C++ API 进行推断
- 我不知道为什么这段代码会让核心被转储?
- C++运行时错误与快速排序算法抛出堆栈转储错误
- 在基数排序中,我得到 munmap_chunk():无效指针和中止(核心转储).为什么?
- C++指针无法在函数外部传递值和分段错误(核心转储)错误
- cygwin_exception::open_stackdumpfile:将堆栈跟踪转储到 class4.exe.sta
- C++快速将 int 数组内容转储到文本文件中
- 合并排序:分段错误核心转储
- 如何使用 logcat 以本机代码打印(或转储)包裹