source: trunk/packages/xen-3.1/xen-3.1/tools/debugger/gdb/README @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 1.4 KB
Line 
1
2DomU & HVM GDB server for 32-bit (PAE and non-PAE) and x86_64 systems
3----------------------------------------------------
4
5Lines marked below with [*] are optional, if you want full
6source-level debugging of your kernel image.
7
8To build the GDB server:
9 0. Build rest of the Xen first from the base directory
10 1. Run ./gdbbuild from within this directory.
11 2. Copy ./gdb-6.2.1-linux-i386-xen/gdb/gdbserver/gdbserver-xen
12    to your test machine.
13
14To build a debuggable guest domU kernel image:
15 1. cd linux-2.6.xx-xenU
16 2. make menuconfig
17 3. From within the configurator, enable the following options:
18    # Kernel hacking -> Compile the kernel with debug info [*]
19                     -> Compile the kernel with frame pointers
20 4. (Re)build and (re)install your xenU kernel image.
21
22To debug a running guest:
23 1. Use 'xm list' to discover its domain id ($domid).
24 2. Run 'gdbserver-xen 127.0.0.1:9999 --attach $domid'.
25 3. Run 'gdb /path/to/vmlinux-syms-2.6.xx-xenU'.
26 4. From within the gdb client session:
27    # directory /path/to/linux-2.6.xx-xenU [*]
28    # target remote 127.0.0.1:9999
29    # bt
30    # disass
31
32To debug a crashed domU guest:
33 1. Add '(enable-dump yes)' to /etc/xen/xend-config.sxp before
34    starting xend.
35 2. When the domain crashes, a core file is written to
36    '/var/xen/dump/<domain-name>.<domain-id>.core'.
37 3. Run 'gdbserver-xen 127.0.0.1:9999 --file <core-file>'.
38 4. Connect to the server as for a running guest.
Note: See TracBrowser for help on using the repository browser.