Linux加載vmlinux調(diào)試
使用gdb加載內(nèi)核符號(hào)表
arm-eabi-gdb out/target/product/msm8625/obj/KERNEL_OBJ/vmlinux
在內(nèi)核的.config里面要打開 DEBUG_INFO和DEBUG_VM
定位故障代碼
(gdb) l * qrd7627a_add_io_devices+0x100 0xc07cd05c is in qrd7627a_add_io_devices (/home/yejialong/GH700C/kernel/arch/arm/mach-msm/msm8x25/goso-msm7627a-io.c:1851). 1846 } else if (machine_is_msm8625q_skud() || machine_is_msm8625q_evbd()) { 1847 #ifndef CONFIG_CALA02 1848 platform_device_register(&pmic_mpp_leds_pdev_skud); 1849 #endif 1850 /* enable the skud flash and torch by gpio leds driver */ 1851 platform_device_register(&gpio_flash_skud); 1852 } else if (machine_is_msm8625q_skue()) { 1853 /* enable the skue flashlight by gpio leds driver */ 1854 platform_device_register(&gpio_flash_skue); 1855 }
下面是mtk平臺(tái)加載的方法,但是不管哪個(gè)平臺(tái)都是差不多的,道理都是一樣的。
weiqifa@weiqifa-Inspiron-3847:~/weiqifa/tm100$ ./prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-gdb ./out/target/product/tm100/obj/KERNEL_OBJ/vmlinux 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://source.android.com/source/report-bugs.html>... Reading symbols from /home/weiqifa/weiqifa/tm100/out/target/product/tm100/obj/KERNEL_OBJ/vmlinux...done. (gdb)
rockchip rk3399調(diào)試vmlinux
./prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-addr2line -f -e kernel/vmlinux weiqifa@dev:~/rk3399_7in1$ ./prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-addr2line -f -e kernel/vmlinux ffffff8008459f3c rk_iommu_domain_free /data/weiqifa/rk3399_7in1/kernel/drivers/iommu/rockchip-iommu.c:1005 (discriminator 2) weiqifa@dev:~/rk3399_7in1$
RK平臺(tái)tombstone調(diào)試
./prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-addr2line -e ./out/target/product/rk3399_mid/symbols/system/lib/libspeexresampler.so 0x00002d54 /proc/self/cwd/external/speex/libspeex/resample.c:376
arm-eabi-gdb 先用命令找到這個(gè)東西,然后在去找去找到vmlinux 還有就是我arm-eabi-4.7/ 這個(gè)版本才可以用,這個(gè)是我試出來的。
總結(jié)
以上就是這篇文章的全部內(nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,謝謝大家對(duì)腳本之家的支持。如果你想了解更多相關(guān)內(nèi)容請(qǐng)查看下面相關(guān)鏈接
- Linux后臺(tái)運(yùn)行Python程序的幾種方法講解
- Linux shell腳本的建立與執(zhí)行
- Python使用paramiko操作linux的方法講解
- Android之在linux終端執(zhí)行shell腳本直接打印當(dāng)前運(yùn)行app的日志的實(shí)現(xiàn)方法
- pyqt遠(yuǎn)程批量執(zhí)行Linux命令程序的方法
- Linux shell環(huán)境下Zabbix Api的使用
- Linux下誤刪messages文件的找回方法
- Linux常見問題解決方案匯總
- Linux內(nèi)核宏container_of的深度剖析
- Linux查看History記錄加時(shí)間戳的小技巧
相關(guān)文章
Centos7.9搭建自主郵件服務(wù)器詳細(xì)步驟
大家好,本篇文章主要講的是Centos7.9搭建自主郵件服務(wù)器詳細(xì)步驟,感興趣的同學(xué)趕快來看一看吧,對(duì)你有幫助的話記得收藏一下哦,方便下次瀏覽2021-12-12Ubuntu設(shè)置開機(jī)自動(dòng)掛載所有格式硬盤分區(qū)
原來那么簡單,安裝下面的東東,運(yùn)行,設(shè)置,搞定!2008-09-09apache下支持asp.net的實(shí)現(xiàn)方法
讓apache支持asp.net的設(shè)置步驟。2009-12-12Linux命令行修改IP、網(wǎng)關(guān)、DNS的方法
這篇文章主要介紹了Linux中在命令行中修改IP、網(wǎng)關(guān)、DNS的方法,需要的朋友可以參考下2014-04-04基于Linux搭建Apache網(wǎng)站服務(wù)配置詳解
這篇文章主要介紹了基于Linux搭建Apache網(wǎng)站服務(wù)配置詳解,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-05-05gdb調(diào)試中設(shè)置監(jiān)控點(diǎn)watch,rwatch,awatch的區(qū)別及說明
這篇文章主要介紹了gdb調(diào)試中設(shè)置監(jiān)控點(diǎn)watch,rwatch,awatch的區(qū)別及說明,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-09-09