我是靠谱客的博主 土豪麦片,最近开发中收集的这篇文章主要介绍android上gdb coredump步骤步骤实测log,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

步骤

首先,编译生成的out/target/product/$project/symbols目录的如下文件放到您新建的symbols 文件夹下,目录结构保持一致:(symbols 例子)
symbols/system/lib/libbinder.so
symbols/system/lib/libandroid_runtime.so
symbols/system/lib/libutils.so
symbols/system/lib/libc.so
symbols/system/bin/app_process

然后把symbols 目录放到和coredump 存放一致的目录。

下面进行gdb 调试

1. 进入gdb 环境
如通过命令行进入 C:Documents and Settingsmtk28119>arm-linux-androideabi-gdb

2. 转到coredump 存放的目录:
如 (gdb) cd D:ddcoredump

3. 执行file 命令
如 (gdb) file symbols/system/bin/app_process
Reading symbols from D:ddcoredump/symbols/system/bin/app_process...done.
4.执行set solib-serach-path
如 (gdb) set solib-search-path symbols/system/lib
5.执行core
如(gdb) core PROCESS_COREDUMP
6.执行 bt
如 (gdb) bt ,这样就可以打印出backtrace 出来了。

 

 

实测log

lumy1@linuxws15:~$ export PATH=$PATH:/home/lumy1/work/snoopy_dev2/sys/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin
lumy1@linuxws15:~$ arm-linux-androideabi-gdb count
GNU gdb (GDB) 7.3.1-gg2
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/lumy1/count...done.

WARNING: no debugging symbols found in /home/lumy1/count.
Either the binary was compiled without debugging information
or the debugging information was removed (e.g., with strip or strip -g).
Debugger capabilities will be very limited.
For further information: http://wiki/Main/GdbFaq#No_debugging_symbols_found

(gdb) set solib-search-path /home/lumy1/work/snoopy_dev2/sys/out/target/product/snoopy/symbols/system/lib
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) core-file core-count.9362.0
warning: exec file is newer than core file.
[New LWP 9362]
warning: while parsing target library list: no element found
Core was generated by `./count'.
Program terminated with signal 11, Segmentation fault.
#0 0x40128020 in ?? ()
(gdb) where
#0 0x40128020 in ?? ()
#1 0x40162684 in cri_sig_handler () from libcr.so
#2 0x40096188 in ?? () from /home/lumy1/linker
#3 0x40096188 in ?? () from /home/lumy1/linker
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

最后

以上就是土豪麦片为你收集整理的android上gdb coredump步骤步骤实测log的全部内容,希望文章能够帮你解决android上gdb coredump步骤步骤实测log所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(56)

评论列表共有 0 条评论

立即
投稿
返回
顶部