VM:Project XenDebugger

From Trusted Cloud Group
Jump to: navigation, search


Current State

  • XenDebugger: The basic feature of application has been finished, source code:XenDebugger


Debugging kernel is a complex work. Now existing kernel debugger is not source level and difficult to build debugging environment.


XenDebugger is a source level kernel debugger on Xen virtualization. The debugged kernel is run on DomU. Xenebugger is run on Dom0.

  • The program uses 3 libraries. libxc is a xen tool library provides interface to control VMs through hypervisor. XenDebugger use libxc to read/write VM memory, get VM registers and receive IRQ to process. libdasm is a independent library that can dis-asm machine instruction into asm code. libdwarf is a DWARF stardard library that provides interface to get debug info from compiled file.
  • XenDebugger can decode compiled file including debug info, then use libxc interface to manager debugging kernel to run. XenDebugger implements common debug tools command. It considers the VM as a program.


The architecture of XenDebugger as follow:


  • The XenDebugger run environment:


Tech Reports Archived

Build and install XenDebugger

You can take the following steps to install the XenDebugger to launch debuggin program.
Stage 1, configure hypervisor

  • Install unmodified Xen (either by binary or source code, refer to xen_install centOS_install)
  • Download the Xen 3.4.2 code (hypervisor is enough), since Joan is implemented on this version
  • Patch the source code
  • Input `make clean && make xen && cp xen/xen.gz /boot/xen.gz` to build and install, we need the Joan-enabled hypervisor alone
  • (Advanced) you can refer to include/joan/config.h to enable or disable certain functionality of Joan (eg. Debugging, profiling, etc)
  • Reboot Dom0

Stage 2, configure DomU

  • Setup DomU, currently we support Ubuntu 10.10 and above
  • Create the disk image launch the VM and install Ubuntu
  • Download Linux kernel source code, refer to kernel-2.6.34
  • Compile kernel with debug config option and generate kernel image file
  • Install on Ubuntu and configurre the cfg file /boot/grub/grub.cfg to boot using new install kernel
  • Reboot DomU

Stage 3, lanch XenDebugger

  • Compile the source code
  • Copy kernel code file and vmlinux
  • Go ahead, launch and test XenDebugger!
Personal tools
Upload file