--- wikisrc/kernel_debugging_with_qemu.mdwn 2015/02/19 09:37:14 1.9 +++ wikisrc/kernel_debugging_with_qemu.mdwn 2018/03/08 16:55:27 1.14 @@ -26,12 +26,13 @@ install the most recent anita package fr ## Building the target system -Check out the NetBSD-current sources from CVS and build a full -NetBSD-current/i386 release with debug symbols using the build.sh -script. The i386 port is the preferred test platform because the two -other ports supported by anita are affected by known bugs: amd64 by -[[PR 49276|http://gnats.NetBSD.org/49276]], and sparc by -[[qemu bug 1335444|https://bugs.launchpad.net/qemu/+bug/1335444]]. +Check out the NetBSD-current sources from CVS and build a full release +of NetBSD-current/i386 with debug symbols using the build.sh script. +The i386 port is preferred because these instructions have been +successfully tested with it. +The amd64 port won't work because of [[PR 50128|http://gnats.NetBSD.org/50128]], +and sparc has not been tested since [[qemu bug +1399943|https://bugs.launchpad.net/qemu/+bug/1399943]] was fixed. If you do the build in a directory other than /usr/src, use the -fdebug-prefix-map option to ensure that the source file names embedded @@ -73,7 +74,7 @@ First start the target VM, enabling qemu on TCP port 1234: [[!template id=programlisting text=""" - $ qemu-system-i386 -nographic -snapshot -hda work/wd0.img -gdb tcp::1234 + $ qemu-system-i386 -nographic -snapshot -hda work/wd0.img -m 128 -gdb tcp::1234 """]] If you don't want everyone on the Internet to be able to debug your @@ -83,7 +84,7 @@ your firewall. In a second terminal window, start the gdb VM: [[!template id=programlisting text=""" - $ qemu-system-i386 -nographic -snapshot -hda work/wd0.img + $ qemu-system-i386 -nographic -snapshot -hda work/wd0.img -m 256 """]] Log in to the gdb VM as root and set up the network: