Closed ltpanda closed 11 months ago
有 Opencore 这个关键字的日志吗。 例如: 11-16 17:13:55.237 13944 19980 I Opencore-arm64: Wait (20330) coredump 11-16 17:13:55.447 20330 20330 I Opencore-arm64: Coredump /storage/emulated/0/Android/data/penguin.opencore.coretester/files/core.13944 ... 11-16 17:13:55.454 20330 20330 I Opencore-arm64: WriteCoreLoadSegment Mode(3) 11-16 17:13:56.424 20330 20330 I Opencore-arm64: [0x5ffff37000] /mali csf db (deleted) Not in self. 11-16 17:13:56.424 20330 20330 I Opencore-arm64: [0x5ffff4a000] /mali csf db (deleted) Not in self. 11-16 17:13:56.425 20330 20330 I Opencore-arm64: [0x5ffff5d000] /mali csf db (deleted) Not in self. 11-16 17:13:56.426 20330 20330 I Opencore-arm64: [0x5ffff70000] /mali csf db (deleted) Not in self. 11-16 17:13:56.427 20330 20330 I Opencore-arm64: [0x5ffff83000] /mali csf db (deleted) Not in self. 11-16 17:13:56.700 20330 20330 I Opencore-arm64: [0x737c09d000] /memfd:jit-cache (deleted) Not in self. 11-16 17:14:01.196 20330 20330 I Opencore-arm64: [0x743168b000] /mali csf user_reg (deleted) Not in self. 11-16 17:14:01.240 20330 20330 I Opencore-arm64: Coredump Done.
lldb 上使用,如下 目录下有以下文件 app_process core.13944 libc.so libopencore-jni.so libopencore.so
(lldb) target create -c core.13944 app_process (lldb) platform select --sysroot . remote-linux
(lldb) thread list Process 0 stopped thread #1: tid = 13944, 0x000000741db312fc libc.so syscall + 28, stop reason = signal SIGSTOP thread #2: tid = 19953, 0x000000741db8e6e8 libc.so rt_sigtimedwait + 8, stop reason = signal 0 thread #3: tid = 19955, 0x000000741db8d9e4 libc.so read + 4, stop reason = signal 0 thread #4: tid = 19956, 0x000000741db8edc4 libc.so ppoll + 4, stop reason = signal 0 thread #5: tid = 19957, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #6: tid = 19958, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #7: tid = 19959, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #8: tid = 19960, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #9: tid = 19961, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #10: tid = 19962, 0x000000741db8dd08 libc.so ioctl + 8, stop reason = signal 0 thread #11: tid = 19964, 0x000000741db8dd08 libc.so ioctl + 8, stop reason = signal 0 thread #12: tid = 19967, 0x000000741db8dd08 libc.so ioctl + 8, stop reason = signal 0 thread #13: tid = 19970, 0x000000741db8ecc8 libc.so__epoll_pwait + 8, stop reason = signal 0 thread #14: tid = 19974, 0x000000741db312fc libc.so`syscall + 28, stop reason = signal 0 thread #15: tid = 19980, 0x000000741db8eec4 libc.so wait4 + 4, stop reason = signal 0 thread #16: tid = 19984, 0x000000742b2ea2d8, stop reason = signal 0 thread #17: tid = 19993, 0x000000741db8ecc8 libc.so epoll_pwait + 8, stop reason = signal 0 thread #18: tid = 19994, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #19: tid = 19995, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #20: tid = 19998, 0x000000741db8ecc8 libc.so epoll_pwait + 8, stop reason = signal 0 thread #21: tid = 20008, 0x000000741db8edc4 libc.so ppoll + 4, stop reason = signal 0 thread #22: tid = 20010, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #23: tid = 20011, 0x000000741db8ecc8 libc.so epoll_pwait + 8, stop reason = signal 0 thread #24: tid = 20012, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #25: tid = 20014, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #26: tid = 20015, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #27: tid = 20016, 0x000000741db8dd08 libc.so ioctl + 8, stop reason = signal 0 thread #28: tid = 20017, 0x000000741db312fc libc.so syscall + 28, stop reason = signal 0 thread #29: tid = 20317, 0x000000741db8ecc8 libc.so epoll_pwait + 8, stop reason = signal 0 thread #30: tid = 20318, 0x000000741db8ecc8 libc.so __epoll_pwait + 8, stop reason = signal 0 thread #31: tid = 20324, 0x000000741db8dd08 libc.so ioctl + 8, stop reason = signal 0
(lldb) thread select 15 thread #15, stop reason = signal 0 frame #0: 0x000000741db8eec4 libc.so wait4 + 4 libc.so wait4: -> 0x741db8eec4 <+4>: svc #0 0x741db8eec8 <+8>: cmn x0, #0x1, lsl #12 ; =0x1000 0x741db8eecc <+12>: cneg x0, x0, hi 0x741db8eed0 <+16>: b.hi 0x741db8d4d0 ; __set_errno_internal
(lldb) bt
thread #15, stop reason = signal 0
frame #0: 0x000000741db8eec4 libc.so wait4 + 4
frame #1: 0x0000007376310f80 libopencore.so OpencoreImpl::DoCoreDump() + 100
frame #2: 0x000000737630e9d8 libopencore.so Opencore::dump(bool) + 72
frame #3: 0x0000007376360de8 libopencore-jni.so Java_penguin_opencore_sdk_Coredump_native_1doCoredump + 16
frame #4: 0x0000007394556434 libart.so art_quick_generic_jni_trampoline + 148
frame #5: 0x000000739453f9a8 libart.so art_quick_invoke_stub + 616
frame #6: 0x0000007394582b10 libart.so art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const) + 176
frame #7: 0x000000739471f964 libart.so bool art::interpreter::DoCall
请问app_process从哪里获取
在手机里 /system/bin/ 目录下
我这边加载成功了,但是显示frame信息感觉是不全的,只有地址没有堆栈信息
(lldb) bt
* thread #1, stop reason = signal SIGSTOP
* frame #0: 0x0000006fee8da48c
frame #1: 0x0000006cf98212c4
frame #2: 0x0000006cf9822d30
frame #3: 0x000000006f6a6400
获得解析该core所依赖的so文件。 (lldb) image list
frame 不全与依赖的so文件有关。
我把libart.so拷贝出来后,堆栈丰富了很多,非常感谢
尝试用lldb打开core文件失败,请问生成的core文件怎么使用