12 Troubleshooting See the built-in help for other available commands. The VM debugger supports symbolic debugging, although symbols for guest code are often not available. For Solaris guests, the detect command automatically determines the guest OS version and locates kernel symbols in guest’s memory. Symbolic debugging is then available. For Linux guests, the detect commands also determines the guest OS version, but there are no symbols in the guest’s memory. Kernel symbols are available in the file /proc/kallsyms on Linux guests. This file must be copied to the host, for example using scp. The loadmap debugger command can be used to make the symbol information available to the VM debugger. Note that the kallsyms file contains the symbols for the currently loaded modules if the guest’s configuration changes, the symbols will change as well and must be updated. For all guests, a simple way to verify that the correct symbols are loaded is the k command. The guest is normally idling and it should be clear from the symbolic information that the guest operating system’s idle loop is being executed. Another group of debugger commands is the set of info commands. Running info help provides complete usage information. The information commands provide ad-hoc data pertinent to various emulated devices and aspects of the VMM. There is no general guideline for using the info commands, the right command to use depends entirely on the problem being investigated. Some of the info commands are: cfgm print a branch of the configuration tree cpuid display the guest CPUID leaves ioport print registered I/O port ranges mmio print registered MMIO ranges mode print the current paging mode pit print the i8254 PIT state pic print the i8259A PIC state ohci/ehci print a subset of the OHCI/EHCI USB controller state pcnet0 print the PCnet state vgatext print the contents of the VGA framebuffer formatted as standard text mode timers print all VM timers The output of the info commands generally requires in-depth knowledge of the emulated de- vice and/or VirtualBox VMM internals. However, when used properly, the information provided can be invaluable. 12.1.4 VM core format VirtualBox uses the 64-bit ELF format for its VM core files created by VBoxManage debugvm see chapter 8.30, VBoxManage debugvm, page 129. The VM core file contain the memory and CPU dumps of the VM and can be useful for debugging your guest OS. The 64-bit ELF object format specficiation can be obtained here: http://downloads.openwatcom.org/ftp/devel/ docs/elf-64-gen.pdf. The overall layout of the VM core format is as follows: [ ELF 64 Header] [ Program Header, type PT_NOTE ] - offset to COREDESCRIPTOR [ Program Header, type PT_LOAD ] - one for each contiguous physical memory range - Memory offset of range 167
Previous Page Next Page