ia64/xen-unstable

view tools/debugger/gdb/README @ 7134:3c1a91c309b8

Update GDB server documentation for crashed guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Sep 29 17:12:48 2005 +0100 (2005-09-29)
parents 06d84bf87159
children 61b3b357d827
line source
2 DomU GDB server for 32-bit (PAE and non-PAE) systems
3 ----------------------------------------------------
5 Lines marked below with [*] are optional, if you want full
6 source-level debugging of your kernel image.
8 To build the GDB server:
9 1. Run ./gdbbuild from within this directory.
10 2. Copy ./gdb-6.2.1-linux-i386-xen/gdb/gdbserver/gdbserver-xen
11 to your test machine.
13 To build a debuggable guest kernel image:
14 1. cd linux-2.6.12-xenU
15 2. ARCH=xen make menuconfig
16 3. From within the configurator, enable the following options:
17 # Kernel hacking -> Compile the kernel with debug info [*]
18 -> Compile the kernel with frame pointers
19 4. (Re)build and (re)install your xenU kernel image.
21 To debug a running guest:
22 1. Use 'xm list' to discover its domain id ($domid).
23 2. Run 'gdbserver-xen 127.0.0.1:9999 --attach $domid'.
24 3. Run 'gdb /path/to/vmlinux-syms-2.6.xx-xenU'.
25 4. From within the gdb client session:
26 # directory /path/to/linux-2.6.xx-xenU [*]
27 # target remote 127.0.0.1:9999
28 # bt
29 # disass
31 To debug a crashed guest:
32 1. Add '(enable-dump yes)' to /etc/xen/xend-config.sxp before
33 starting xend.
34 2. When the domain crashes, a core file is written to
35 '/var/xen/dump/<domain-name>.<domain-id>.core'.
36 3. Run 'gdbserver-xen 127.0.0.1:9999 --file <core-file>'.
37 4. Connect to the server as for a running guest.