发生了什么问题?
依照Q5.打开CoreDump的方法介绍的方法,使用是最近的ohos-sdk工具, 无法windows与Ubuntu上使用lldb调测foundation的coredump文件。但同样的coredump在开发板上使用lldb可以看到完整的堆栈。
期望行为是什么?
windows与Ubuntu上使用lldb可以正确的调测foundation的coredump文件。
windows(或者Ubuntu)
![image.png image.png](https://forums-obs.openharmony.cn/forum/202402/04/200311gtmdlhls1sr1tdm1.png)
开发板(rk3568)
我们也试过其他开发板,表现都一样
<font color="red">这样是不是说明coredump文件本身没有问题, 是windows与Ubuntu的lldb工具有存在问题</font>
![image.png image.png](https://forums-obs.openharmony.cn/forum/202402/04/200611xdbo9y8e9blx4eo4.png)
如何复现该缺陷*****
1, 使用ohos-sdk如下
https://cidownload.openharmony.cn/version/Master_Version/OpenHarmony_4.1.6.2/20240109_023243/version-Master_Version-OpenHarmony_4.1.6.2-20240109_023243-ohos-sdk-full_weekly.tar.gz
2, 打开foundation相关的coredump脚本
hdc shell "toybox prlimit -c -H unlimited"
hdc shell "toybox prlimit -c -S unlimited"
hdc shell "toybox prlimit -c -H unlimited -P $(pidof foundation)"
hdc shell "toybox prlimit -c -S unlimited -P $(pidof foundation)"
hdc shell "echo 1 > /proc/sys/kernel/core_uses_pid"
hdc shell "echo 1 > /proc/sys/kernel/print-fatal-signals"
hdc shell "echo 0x33 > /proc/$(pidof foundation)/coredump_filter"
hdc shell "mkdir -p /data/log/coredump; chmod 777 -R /data/log/coredump; echo /data/log/coredump/coredump.%p.bin > /proc/sys/kernel/core_pattern"
3, 生成coredump的命令
echo $(pidof foundation) && kill -SEGV $(pidof foundation)
4, 把coredump保存到windows上。
5,使用windows(或者Ubuntu)上对应版本的lldb查看堆栈。
lldb -c <coredump_file> <unstriped_file>
bt
p <var>
f <frame_no>
![image.png image.png](https://forums-obs.openharmony.cn/forum/202402/04/200303rgcwcwa1ksxkez2k.png)
- 在开发板上
![image.png image.png](https://forums-obs.openharmony.cn/forum/202402/04/201315kt9l3d1idcbeebsr.png)
版本或分支信息
|