0

I have requirement where i wanted to debud my Linux kernel image using GDB but not sure whats is option available for it,

When I run below command

gdb ./vmlinux

 users/amit/vmlinuz-2.6.32-33-generic": not in executable format: File format not recognized

1 Answer 1

4

The z at the end of vmlinuz tells you that your kernel image is in a compressed format. To debug it, you need to have an uncompressed version. You can extract a vmlinux from your vmlinuz, but you have to make sure you have the required debug symbols somewhere (System.map?).

The easiest option is probably to rebuild your kernel with debug symbols and without compression.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.