Results 1 to 2 of 2

Thread: KGDB in Ubuntu 8.10

  1. #1
    Join Date
    Dec 2008
    Beans
    2

    KGDB in Ubuntu 8.10

    So I've been wrestling with ubuntu 8.10 to try and make it work with the kernel debugger (kgdb) that is included with 2.6.27. I am trying to run this on a kernel I compiled myself using the same config file that the stock kernel was compiled with and compiling the source from the linux-source-2.6.27 package. I have not changed any of the kernel config options. The relevant sections of the file for kgdb are as follows:

    Code:
    CONFIG_HAVE_ARCH_KGDB=y
    CONFIG_KGDB=y
    CONFIG_KGDB_SERIAL_CONSOLE=y
    # CONFIG_KGDB_TESTS is not set
    I complied the kernel using make-kpkg as such:

    Code:
    $ fakeroot make-kpkg --revision=1 --append-to-version=-david --initrd kernel_image
    and then installed the resulting .deb with dpkg. Everything boots up normally and I can verify that I'm running my kernel as such:

    Code:
    $ uname -a
    Linux ubuntu-test 2.6.27.2-david #1 SMP Wed Dec 24 19:23:47 EST 2008 i686 GNU/Linux
    When I try to boot the kernel with kgdbwait, the kernel boots up normally. Here is the grub entry:

    Code:
    title           Ubuntu 8.10, kernel 2.6.27.2-david with kgdb
    uuid            a47d32d3-d5a3-454f-abd2-9e10f1aec517
    kernel          /boot/vmlinuz-2.6.27.2-david root=UUID=a47d32d3-d5a3-454f-abd2-9e10f1aec517 ro crashkernel=384M-2G:64M@16M,2G-:128M@16M kgdbwait kgdb8250=0,115200
    initrd          /boot/initrd.img-2.6.27.2-david
    quiet
    As far as I understand it, when I boot with these options, the kernel should hang close to the beginning of boot with the following output and wait for a remote connection from gdb with the following message:

    Code:
    Waiting for connection from remote gdb...
    Instead I'm just booting up as if kgdbwait isn't even there.

    Some further info that is probably useful:

    Code:
    $ dmesg | grep -i kgdb
    [    0.000000] Kernel command line: root=UUID=a47d32d3-d5a3-454f-abd2-9e10f1aec517 ro crashkernel=384M-2G:64M@16M,2G-:128M@16M kgdbwait kgdb8250=0,115200
    Code:
    $ grep -i kgdb /var/log/kern.log
    Dec 26 01:24:32 ubuntu-test kernel: [    0.000000] Kernel command line: root=UUID=a47d32d3-d5a3-454f-abd2-9e10f1aec517 ro crashkernel=384M-2G:64M@16M,2G-:128M@16M kgdbwait kgdb8250=0,115200
    I'm running this on VMware Fusion 2.0.1 with VMware Tools 7.9.3, build-128865. Other than that, everything is standard stuff from the intrepid repository.

    Any help on this would be appreciated.

    Best,
    -David

  2. #2
    Join Date
    Dec 2008
    Beans
    2

    Re: KGDB in Ubuntu 8.10

    For future reference, after some poking around in the kgdboc driver, I found that the kernel command line I was looking for was

    Code:
    kgdboc=ttyS0,115200
    More info can be found here:

    http://www.kernel.org/pub/linux/kern...b/ch03s03.html

    Happy Hacking,
    -David

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •