diff -r cd6f1a4e9a39 tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure --- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure Sun Sep 4 23:51:39 2005 +++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure Mon Sep 5 14:08:32 2005 @@ -3475,7 +3475,7 @@ GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles" -GDBSERVER_LIBS="$srv_libs -L../../../../../libxc/ -lxc" +GDBSERVER_LIBS="$srv_libs -L../../../../../libxc/ -lxenctrl" diff -r cd6f1a4e9a39 tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure.in --- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure.in Sun Sep 4 23:51:39 2005 +++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure.in Mon Sep 5 14:08:32 2005 @@ -107,7 +107,7 @@ GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_thread_depfiles" -GDBSERVER_LIBS="$srv_libs -L../../../../../libxc/ -lxc" +GDBSERVER_LIBS="$srv_libs -L../../../../../libxc/ -lxenctrl" AC_SUBST(GDBSERVER_DEPFILES) AC_SUBST(GDBSERVER_LIBS) diff -r cd6f1a4e9a39 tools/debugger/gdb/README --- /dev/null Sun Sep 4 23:51:39 2005 +++ b/tools/debugger/gdb/README Mon Sep 5 14:08:32 2005 @@ -0,0 +1,41 @@ +1. Build Xen with domu_debug enabled, to do this build Xen with + + $ make verbose=y domu_debug=y debug=y world + +2. Enter tools/debugger/gdb and run ./gdbbuild to compile GDB and the + GDB server + +3. Install the gdbserver and gdb (as root): + + $ cp gdb-6.2.1-linux-i386-xen/gdb/gdbserver/gdbserver-xen /usr/local/bin/ + $ cp gdb-6.2.1-linux-i386-xen/gdb/gdb /usr/local/bin/gdb-xen + + +The rest of this file assumes that you debug the mini-OS in +extras/mini-os (build it by running make first) + +4. Create a new domain (paused in this case) + + $ xm create -p domain_config + +5. Start gdbserver with the domain id (use xm list to get the id) + + $ gdbserver-xen localhost:9999 --attach DOMAIN_ID & + +6. Start gdb-xen with the OS binary and attach to the gdbserver + + $ gdb-xen mini-os.elf + + GNU gdb 6.2.1 + ... + (gdb) target remote localhost:9999 + Remote debugging using localhost:9999 + Remote debugging from host 127.0.0.1 + _start () at x86_32.S:12 + ... + + +This document is written by Simon Kagstrom and is based +the following mail by Tim Newsham to the xen-devel mailing list: + +http://lists.xensource.com/archives/html/xen-devel/2005-08/msg00981.html