Changes between Version 9 and Version 10 of Testing


Ignore:
Timestamp:
Oct 21, 2012, 10:04:42 AM (9 years ago)
Author:
Juri
Comment:

more detail from recent kgdb invocations.

Legend:

Unmodified
Added
Removed
Modified
  • Testing

    v9 v10  
    4444qemu -kernel bzImage \
    4545-initrd initrd.gz \
    46 -append "ramdisk_size=34000 root=/dev/ram0 rw kgdbwait kgdboc=ttyS1" \
     46-append "ramdisk_size=34000 root=/dev/ram0 rw kgdbwait kgdboc=ttyS0" \
    4747-net nic,model=e1000,macaddr=52:54:00:12:34:57 \
    4848-net socket,mcast=230.0.0.1:1234 \
     
    5050}}}
    5151
    52 You'll get something like this:
    53 {{{
    54 char device redirected to /dev/pts/11
    55 }}}
     52This will start the kernel/VM with a single serial port, connected to kgdb.
     53
     54At the QEMU command console, you can type 'info chardev' to find out what pts is connected to that serial port.
    5655
    5756Important Note:  Be sure to change the macaddr argument to be different for each machine that is invoked, otherwise things will break.
     
    6261qemu -kernel bzImage \
    6362-initrd initrd.gz \
    64 -append "ramdisk_size=34000 root=/dev/ram0 rw kgdbwait kgdboc=ttyS1" \
     63-append "ramdisk_size=34000 root=/dev/ram0 rw kgdbwait kgdboc=ttyS0" \
    6564-net nic,model=e1000,macaddr=52:54:00:12:34:57 \
    6665-net socket,mcast=230.0.0.1:1234 \
    67 -serial stdio \
    6866-serial pty \
    6967-vnc :0
     
    7674gdb /path/to/vmlinux
    7775}}}
    78 connect to kgdb
     76
     77Using the pty retrieved from the qemu command prompt, you can then connect GDB to the running kernel:
    7978{{{
    8079gdb) target remote /dev/pts/11
    8180}}}
     81
    8282You should now be connected.
    8383{{{
    8484gdb) continue
    8585}}}
    86 This will start the kernel, if you dont want to do this, remove the kgdbwait from the append argument to qemu.
     86This will start the kernel, and get it past the point at which the kernel pauses automatically. if you don't want to do this, remove the kgdbwait from the append argument to qemu.
    8787
    8888== When stuff breaks ==