简体   繁体   English

无法在gdb上调试lInux

[英]Unable to debug lInux on gdb

I am trying to debug Linux using gdb, I compiled kernel with "compile kernel with debug info". 我正在尝试使用gdb调试Linux,我使用“使用调试信息编译内核”编译了内核。 once kernel is compiled I am trying to give GDB file vmlinux (running above command gives me below error) 一旦内核被编译,我试图给GDB文件vmlinux(上面的命令运行给我下面的错误)

 GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1


Reading symbols from file...(no debugging symbols found)...done.
"/home/Linux/vmlinux" is not a core dump: File format not recognized

Even I am setting debug con-figs it is giving me "no debugging symbols found" 即使我设置了调试配置,它也会给我“找不到调试符号”

kernel debugging is a whole different ballgame from debugging a user process and is not as simple as firing up GDB. 内核调试与调试用户进程完全不同,它并不像启动GDB那样简单。 For this you will need support of a JTAG. 为此,您将需要JTAG的支持。 QEMU allows you to virtualize a machine and therefore use a virtual JTAG. QEMU允许您虚拟化计算机,因此可以使用虚拟JTAG。

For simple stuff you will probably find printk much easier. 对于简单的东西,您可能会发现printk容易得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM