Linux loading vmlinux debugging

Linux loading vmlinux debugging

Loading kernel symbols using gdb

arm-eabi-gdb out/target/product/msm8625/obj/KERNEL_OBJ/vmlinux

In the kernel's .config, turn on DEBUG_INFO and DEBUG_VM

Locating fault code

(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 }

The following is the method of loading the mtk platform, but no matter which platform, it is similar and the principle is the same.

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 debugging 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 platform tombstone debugging

./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

Use the command arm-eabi-gdb to find this thing first, then go and find vmlinux. And my arm-eabi-4.7/ version can be used. This is what I tried.

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Several ways to run Python programs in the Linux background
  • Creating and executing Linux shell scripts
  • Python uses paramiko to operate Linux
  • Android's implementation method of executing shell scripts in the Linux terminal to directly print the log of the currently running app
  • How to remotely batch execute Linux command programs using pyqt
  • Use of Zabbix Api in Linux shell environment
  • How to recover accidentally deleted messages files in Linux
  • Summary of solutions to common Linux problems
  • In-depth analysis of the Linux kernel macro container_of
  • Tips for viewing History records and adding timestamps in Linux

<<:  How to implement a lucky wheel game in WeChat applet

>>:  Detailed explanation of mysql exists and not exists examples

Recommend

Mini Program to Implement Calculator Function

This article example shares the specific code of ...

Detailed explanation of basic syntax and data types of JavaScript

Table of contents Importing JavaScript 1. Interna...

javascript Blob object to achieve file download

Table of contents illustrate 1. Blob object 2. Fr...

Use Angular CDK to implement a Service pop-up Toast component function

Table of contents 1. Environmental Installation 2...

How to bind Docker container to external IP and port

Docker allows network services to be provided by ...

Detailed process of changing apt source to Alibaba Cloud source in Ubuntu 18.04

Table of contents Preface: Ubuntu 18.04 changes a...

JavaScript to achieve simple drag effect

This article shares the specific code of JavaScri...

Detailed tutorial on building Gitlab server on CentOS8.1

There is no need to say much about the difference...

Why MySQL database avoids NULL as much as possible

Many tables in MySQL contain columns that can be ...

Implementation of dynamic particle background plugin for Vue login page

Table of contents The dynamic particle effects ar...

Detailed explanation of Linux Namespace User

User namespace is a new namespace added in Linux ...

Table of CSS Bugs Caused by hasLayout

IE has had problems for a long time. When everyone...