In case you're not already familiar with it, gdbserver-xen is
something I added to xen several years ago, it makes it possible to
debug domU guests as if they were ordinary single or threaded
processes (UP or SMP).

You can find an updated patch for xen-3.3 and xen-3.4 at:

pandemonium is a linux xen host
delirium is a freebsd system

patch xen-3.3 (or xen-3.4)

cd xen-3.3/tools
sudo -c make install

cd ../debugger/gdb
sudo -c cp gdb-6.8-linux-i386-xen/gdb/gdbserver/gdbserver-xen /usr/local/bin

[r...@pandemonium ~]# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  5093     4     r-----    281.0
ExampleDomain                                1  3000     1     -b----     39.5

[r...@pandemonium kmacy]# ip  addr show dev eth0
6: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
   link/ether 00:30:48:94:f5:62 brd ff:ff:ff:ff:ff:ff
   inet brd scope global eth0
   inet6 fe80::230:48ff:fe94:f562/64 scope link
      valid_lft forever preferred_lft forever

[r...@pandemonium kmacy]# gdbserver-xen --attach 1
xc_ptrace(PTRACE_ATTACH, 1, 0, 0)
Attached; pid = 1
Listening on port 5555

% gdb  
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
 target remote
Remote debugging using
[New Thread 1]
0xc003e3a7 in hypercall_page () at
249             /* At the end of our stack, we shall have free space -
so store it */
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: shared library handler failed to enable breakpoint
Current language:  auto; currently asm
(gdb) bt
#0  0xc003e3a7 in hypercall_page () at
#1  0xc032b5df in idle_block () at hypercall.h:189
#2  0xc0314ed7 in cpu_idle_hlt (busy=1) at
#3  0xc03142c2 in cpu_idle (busy=1) at
#4  0xc00f7d32 in sched_idletd (dummy=0x0) at
#5  0xc00aeed8 in fork_exit (callout=0xc00f7ca0 <sched_idletd>,
arg=0x0, frame=0xc5a4fd38)
   at /usr/home/kmacy/svn_checkouts/head_new/sys/kern/kern_fork.c:843
#6  0xc030f5b4 in fork_trampoline () at

To debug from boot  pass -p to xm create to pause at the first instruction.

When harsh accusations depart too far from the truth, they leave
bitter consequences.
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to