Reputation: 1226
I am trying to debug Linux using gdb, I compiled kernel with "compile kernel with debug info". once kernel is compiled I am trying to give GDB file vmlinux (running above command gives me below error)
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"
Upvotes: 0
Views: 340
Reputation: 28872
kernel debugging is a whole different ballgame from debugging a user process and is not as simple as firing up GDB. For this you will need support of a JTAG. QEMU allows you to virtualize a machine and therefore use a virtual JTAG.
For simple stuff you will probably find printk
much easier.
Upvotes: 6