direct-io.hg

changeset 5458:21bfdeafeec2

bitkeeper revision 1.1713.1.10 (42b03d19TAy64Sdjkm7M7nVoGNwCVw)

readme for pdb 0.3
author ach61@arcadians.cl.cam.ac.uk
date Wed Jun 15 14:37:13 2005 +0000 (2005-06-15)
parents 9a502087e263
children a1112c70ee4a
files .rootkeys tools/debugger/pdb/readme
line diff
     1.1 --- a/.rootkeys	Tue Jun 14 19:30:50 2005 +0000
     1.2 +++ b/.rootkeys	Wed Jun 15 14:37:13 2005 +0000
     1.3 @@ -542,6 +542,7 @@ 42a0c8da81tzhpvIAfkx9nZqUNrQvg tools/deb
     1.4  42a0c8dasiso9c-2sCvHBzP6YVjATA tools/debugger/pdb/evtchn.mli
     1.5  42a0c8daXD_6Y62A_u5-PO_Klrhi0w tools/debugger/pdb/pdb_caml_xc.c
     1.6  42a0c8danJXun9ay5SPBhhkKvuUPfg tools/debugger/pdb/pdb_xen.c
     1.7 +42b03d06llc_GE7fXGQ6-rYR4VFAcw tools/debugger/pdb/readme
     1.8  42a0c8dbjK6Du89D2SUcxsuAdlUu3w tools/debugger/pdb/server.ml
     1.9  401d7e160vaxMBAUSLSicuZ7AQjJ3w tools/examples/Makefile
    1.10  401d7e16UgeqroJQTIhwkrDVkoWgZQ tools/examples/README
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tools/debugger/pdb/readme	Wed Jun 15 14:37:13 2005 +0000
     2.3 @@ -0,0 +1,84 @@
     2.4 +
     2.5 +PDB 0.3 
     2.6 +http://www.cl.cam.ac.uk/netos/pdb
     2.7 +
     2.8 +Alex Ho  
     2.9 +June 2005
    2.10 +
    2.11 +
    2.12 +This is the latest incarnation of the pervasive debugger.
    2.13 +PDB is a remote stub for GDB.  Running as a user-space
    2.14 +application in domain 0, it can debug any other domain.
    2.15 +
    2.16 +
    2.17 ++------+    tcp/ip    +-------+  
    2.18 +| GDB  |--------------|  PDB  |
    2.19 ++------+              +-------+   +-------+
    2.20 +                      | Dom 0 |   | Dom U |
    2.21 +                      +-------+---+-------+
    2.22 +                      |  Xen              |
    2.23 +                      +-------------------+
    2.24 +
    2.25 +Installation
    2.26 +
    2.27 +- Install OCaml 3.08 in domain 0.
    2.28 +  http://caml.inria.fr/download.en.html  is a good place to start.
    2.29 +
    2.30 +- Build Xen with debugger support
    2.31 +  make domu_debug=y xen
    2.32 +
    2.33 +- (optional)
    2.34 +  Build the target domains with debugging symbols.
    2.35 +  make CONFIG_DEBUG_INFO=true CONFIG_FRAME_POINTER=false linux-2.6-xenU-build
    2.36 +
    2.37 +  You can also change linux-2.6.11-xenU/Makefile
    2.38 +  CONFIG_CC_OPTIMIZE_FOR_SIZE from -O2 to -O
    2.39 +
    2.40 +- Build PDB
    2.41 +  (cd tools/debugger/libxendebug; make install)
    2.42 +  (cd tools/debugger/pdb; make)
    2.43 +
    2.44 +Usage
    2.45 +
    2.46 +- PDB does not currently support SMP.  Please boot xen with "maxcpus=1"
    2.47 +
    2.48 +- Run PDB
    2.49 +  domain-0.xeno# ./pdb <port>
    2.50 +
    2.51 +- Run GDB
    2.52 +  hostname% gdb <xeno.bk>/dist/install/boot/vmlinux-syms-2.6.11.11-xenU
    2.53 +
    2.54 +  (gdb) target remote domain-0.xeno:<port>
    2.55 +
    2.56 +  At this point, you'll get an error message such as:
    2.57 +  Remote debugging using domain-0.xeno:5000
    2.58 +  0x00000000 in ?? ()
    2.59 +  warning: shared library handler failed to enable breakpoint
    2.60 +  Although GDB is connected to PDB, PDB doesn't know which domain
    2.61 +  you'd like to debug, so it's just feeding GDB a bunch of zeros.
    2.62 +
    2.63 +  (gdb) maint packet x context = domain <domid> <vcpu>
    2.64 +
    2.65 +  This tells PDB that we'd like to debug a particular domain & vcpu.
    2.66 +  However, since we're sending the command directly to PDB, GDB doesn't 
    2.67 +  know that we now have a proper target.  We can force GDB to invalidate
    2.68 +  its register cache.  This is optional; the next time the program
    2.69 +  stops GDB will query for the registers automatically.
    2.70 +
    2.71 +  (gdb) flushreg
    2.72 +
    2.73 +  
    2.74 +  the following gdb commands should work :)
    2.75 +
    2.76 +  break
    2.77 +  step,   stepi
    2.78 +  next,   nexti
    2.79 +  continue
    2.80 +  print
    2.81 +
    2.82 +
    2.83 +To Do
    2.84 +
    2.85 +- watchpoints
    2.86 +- support for SMP
    2.87 +- support for user applications