2

I need to setup a kernel debug session so that I can peek & poke some registers on a PCIe HW device. I am using Ubuntu 12.04, which uses Grub2. Based on my /boot/config-3.5.0-23-generic file, the kernel was already built with KGDB support, but apparently not with kgdb-over-ethernet support. For this, I'm in the processing of rebuilding the kernel.

In the mean time, I'm trying to figure out how to modify my Grub2 config file to add an entry for KGDB. The only tutorials I've been able to find on this all refer to legacy Grub-style syntax for doing this:

title 2.6.15.5-kgdb
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.15.5-kgdb ro root=/dev/hda1 kgdbwait kgdb8250=1,115200

The syntax for Grub2 is clearly different, as it appears the "kernel" command has been replaced with "linux", and I see a variety of other differences as well. This gives me little hope for expecting the old syntax to "just work".

I have not been able to find any instructions for configuring KGDB with Grub2 online. What is the correct way to do this? Could some one provide a sample using Grub2 syntax?

Also, since I'm new to kernel debugging in Linux, perhaps I'm not even going about this in the right way. Please let me know if I should be using a different method for this, for example if everybody else uses serial debugging because of known problems with ethernet, or whatever the case may be.

Thanks!

Matt M
  • 259
  • 3
  • 6

0 Answers0