Diff for /wikisrc/kernel_debugging_with_qemu.mdwn between versions 1.11 and 1.15

version 1.11, 2015/07/21 19:12:21 version 1.15, 2018/03/08 16:57:05
Line 16  If your host system is running NetBSD, i Line 16  If your host system is running NetBSD, i
 from pkgsrc:  from pkgsrc:
   
 * emulators/qemu >= 2.0.0nb4  * emulators/qemu >= 2.0.0nb4
 * misc/py-anita  * misc/py-anita >= 1.44
   
 If your host system uses a package system other than pkgsrc,  If your host system uses a package system other than pkgsrc,
 use that to install cvs, make, gcc, qemu, the Python pexpect  use that to install cvs, make, gcc, qemu, the Python pexpect
Line 26  install the most recent anita package fr Line 26  install the most recent anita package fr
   
 ## Building the target system  ## Building the target system
   
 Check out the NetBSD-current sources from CVS and build a full release of  Check out the NetBSD-current sources from CVS and build a full release
 NetBSD-current/i386 or /amd64 with debug symbols using the build.sh  of NetBSD-current/i386 with debug symbols using the build.sh script.
 script.  The i386 and amd64 ports are the preferred test platforms because  The i386 port is preferred because these instructions have been 
 sparc, the only other port supported by anita, is affected by a known bug,  successfully tested with it.
 [[qemu bug 1399943|https://bugs.launchpad.net/qemu/+bug/1399943]].  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,   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  use the -fdebug-prefix-map option to ensure that the source file names embedded
 in the debug symbols point to /usr/src, which is where the sources will be  in the debug symbols point to /usr/src, which is where the sources will be
Line 71  First start the target VM, enabling qemu Line 74  First start the target VM, enabling qemu
 on TCP port 1234:  on TCP port 1234:
   
 [[!template  id=programlisting text="""  [[!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  If you don't want everyone on the Internet to be able to debug your
Line 81  your firewall. Line 84  your firewall.
 In a second terminal window, start the gdb VM:  In a second terminal window, start the gdb VM:
   
 [[!template  id=programlisting text="""  [[!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:  Log in to the gdb VM as root and set up the network:

Removed from v.1.11  
changed lines
  Added in v.1.15


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb