Commit da415d54bfea85f6321f5b03c953b48cbbd5d217
1 parent
b4608c04
gdb usage information
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@289 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
33 additions
and
0 deletions
qemu-doc.texi
... | ... | @@ -402,6 +402,9 @@ by |
402 | 402 | # define HZ 100 /* Internal kernel timer frequency */ |
403 | 403 | @end example |
404 | 404 | |
405 | +If you have problems running your kernel, verify that neither the SMP nor | |
406 | +HIGHMEM configuration options are activated. | |
407 | + | |
405 | 408 | @section PC Emulation |
406 | 409 | |
407 | 410 | QEMU emulates the following PC peripherials: |
... | ... | @@ -421,6 +424,36 @@ NE2000 network adapter (port=0x300, irq=9) |
421 | 424 | Dumb VGA (to print the @code{Uncompressing Linux} message) |
422 | 425 | @end itemize |
423 | 426 | |
427 | +@section GDB usage | |
428 | + | |
429 | +QEMU has a primitive support to work with gdb, so that you can do | |
430 | +'Ctrl-C' while the kernel is running and inspect its state. | |
431 | + | |
432 | +In order to use gdb, launch vl with the '-s' option. It will wait for a | |
433 | +gdb connection: | |
434 | +@example | |
435 | +> vl -s arch/i386/boot/bzImage initrd-2.4.20.img root=/dev/ram0 ramdisk_size=6144 | |
436 | +Connected to host network interface: tun0 | |
437 | +Waiting gdb connection on port 1234 | |
438 | +@end example | |
439 | + | |
440 | +Then launch gdb on the 'vmlinux' executable: | |
441 | +@example | |
442 | +> gdb vmlinux | |
443 | +@end example | |
444 | + | |
445 | +In gdb, connect to QEMU: | |
446 | +@example | |
447 | +(gdb) target remote locahost:1234 | |
448 | +@end example | |
449 | + | |
450 | +Then you can use gdb normally. For example, type 'c' to launch the kernel: | |
451 | +@example | |
452 | +(gdb) c | |
453 | +@end example | |
454 | + | |
455 | +WARNING: breakpoints and single stepping are not yet supported. | |
456 | + | |
424 | 457 | @chapter QEMU Internals |
425 | 458 | |
426 | 459 | @section QEMU compared to other emulators | ... | ... |