Linux kernel debugger?

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there any debugger available for debugging the linux kernel?

KGDB is only supported on i386, x86_64, ppc and s390 and KDB on x86, IA64.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, there is no in-kernel debugger for the AVR32. But the kernel for the most part is not debugged with debuggers, various devs thinking that this makes for sloppy checking, much better to find bugs by actually inspecting the code. While that takes a decent amount longer most of the time, all tends to come out nicer. Never underestimate the value of a well-placed printk.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There's also KProbes, which allows you to inject probes at almost any point in the kernel where you can execute your own code. It's not really a debugger per se, but it can be quite powerful.

You can also debug the kernel using the JTAGICEmkII, avr32gdbproxy and avr32-(linux-)gdb just like any other standalone application. Just stop at the u-boot prompt, set a hardware breakpoint at 0x90000000 and do the normal boot sequence. It should break at the first kernel instruction.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you try to debug with this setup (mkII + avr32gdbproxy + avr32-linux-gdb) the linux kernel ? I can do this only before the MMU setup. After the MMU is initialized I can't go to next istruction or dump memory, nothing.