WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] pdb missing files?

Hi Kip,

Thanks for the tip about crash_debug and domu_debug being mutually exclusive; I actually _just_ discovered that. :-)

I added the debugger=y because it was mentioned in an old xen-devel post.  

To get Xen to break, we hit '%' after hitting Ctrl+A Ctrl+A Ctrl+A to get Xen to give us a prompt via the first serial connection.  It leaves me with the prompt: Waiting for GDB to attach to XenDBG.

In the morning I will try using gdb-server with only one of {crash_debug, domu_debug} enabled.  It sounds like that might do the trick.

> hg tip
changeset:   7058:70b6e60df750
tag:         tip
date:        Mon Sep 26 14:13:57 2005 +0100
summary:     Move non-transactional and non-idempotent code out of

Thanks again for all your help,
-Jon


On Sep 30, 2005, at 2:42 AM, Kip Macy wrote:

Jonathan -

First of all (although this should not be the case) crash_debug and domu_debug are mutually exclusive. That would explain why the int3 is not being handled correctly.

What changeset are you running with? I don't have a "debugger" option in my Rules.mk. I've never done serial debugging without a console server sitting between me and the server (their definitely worth the money) - so I can only assume that you're hooking your gdb client machine up from its first serial port to the servers second serial port (keep that server they don't seem make machines with more than one serial port any more).

What are you doing to get xen to break and wait for GDB? I thought that model of PDB had been removed with the transition to 3.0.

   -Kip


On 9/29/05, Jonathan McCune <jonmccune@xxxxxxx> wrote:
Thanks Kip.

Here are the settings from my Rules.mk.  I'm still unable to get satisfactory results using gdb-server.

verbose     ?= y
debug       ?= y
perfc       ?= n
perfc_arrays?= n
trace       ?= n
domu_debug  ?= y
crash_debug ?= y
debugger    ?= y

I am able to use a serial cable to Ctrl+A Ctrl+A Ctrl+A and get a console in Xen.  Further, I am able to get Xen to break and wait for gdb to connect.  
However, I have had some difficulty attaching gdb over an additional serial link.  For example:

(gdb) set remotebaud 115200
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Couldn't establish connection to remote target
Malformed response to offset query, timeout
(gdb)

Unfortunately, these gdb error messages appear to be the same even with the serial cable disconnected.  This causes me to suspect that I have not configured some of the serial settings correctly, but I have been unable to find any such settings.

While we're at it, here's the entry from my grub.conf:

title           Xen-Unstable, Debian GNU/Linux
root            (hd0,0)
kernel          /boot/xen.gz com1=115200,8n1 com2=115200,8n1 cdb=com2 maxcpus=1
module          /boot/vmlinuz-2.6.12-xen0 root=/dev/sda1 ro

Thanks for any help you can provide!
-Jon



On Sep 30, 2005, at 2:13 AM, Kip Macy wrote:

Jonathan -

It is quite possible that pdb has not been updated since it was first checked in. There has been a lot of churn in 3.0 in the last couple of months. You might wish to note that much of the pdb work appears (on the C side of the implementation) to be derived from the GDB support work. They both depend on int3 being translated into pausing a domain in xen. Switching to PDB will not help if that is not occurring. I've successfully used gdbserver-xen on xen from as of Sunday for tracking down issues in FreeBSD earlier this week. If you haven't yet tried, you might wish to try enabling debug as well in Rules.mk.

     -Kip
 


On 9/29/05, Jonathan M. McCune <jonmccune@xxxxxxx> wrote:
Hello,

I'm trying to get PDB working in accordance with the instructions at
http://www.cl.cam.ac.uk/~sos22/replay.bk/docs/misc/XenDebugger-HOWTO and
a message from this list:
http://lists.xensource.com/archives/html/xen-devel/2004-08/msg00017.html


When I try to build pdb I first get errors because the Makefile is
configured to treat warnings as errors, and there are some warnings.  I
decided to take my chances, and I removed Werror from CFLAGS in
tools/debugger/pdb/Makefile.  At that point, the build failed because it
is unable to find xcs_proto.h.  After some googling, it seems this
existed in the xen-unstable.hg tree earlier this month.

Is the PDB system currently broken?

Thanks,
-Jon



Output of errors from warnings:

root:01:20 AM:pdb $ make
make[1]: Entering directory
`/usr/src/xen-unstable.hg-20050930_orig/tools/debugger/pdb'
making ._bcdi/Process.di from Process.mli
making ._bcdi/Domain.di from Domain.mli
making ._bcdi/Xen_domain.di from Xen_domain.mli
making ._bcdi/xcs.di from xcs.mli
making ._bcdi/evtchn.di from evtchn.mli
making ._d/server.d from server.ml
making ._d/debugger.d from debugger.ml
making ._d/PDB.d from PDB.ml
making ._d/Process.d from Process.ml
making ._d/Domain.d from Domain.ml
making ._d/Xen_domain.d from Xen_domain.ml
making ._d/xcs.d from xcs.ml
making ._d/evtchn.d from evtchn.ml
making ._d/Intel.d from Intel.ml
making ._d/Util.d from Util.ml
make[1]: Leaving directory
`/usr/src/xen-unstable.hg-20050930_orig/tools/debugger/pdb'
make[1]: Entering directory
`/usr/src/xen-unstable.hg-20050930_orig/tools/debugger/pdb'
/usr/local/bin/ocamlc -c -g Util.ml
/usr/local/bin/ocamlc -c -g Intel.ml
/usr/local/bin/ocamlc -c -g evtchn.mli
/usr/local/bin/ocamlc -c -g evtchn.ml
/usr/local/bin/ocamlc -c -g xcs.mli
/usr/local/bin/ocamlc -c -g xcs.ml
/usr/local/bin/ocamlc -c -g Xen_domain.mli
/usr/local/bin/ocamlc -c -g Xen_domain.ml
/usr/local/bin/ocamlc -c -g Domain.mli
/usr/local/bin/ocamlc -c -g Domain.ml
/usr/local/bin/ocamlc -c -g Process.mli
/usr/local/bin/ocamlc -c -g Process.ml
/usr/local/bin/ocamlc -c -g PDB.ml
/usr/local/bin/ocamlc -c -g debugger.ml
/usr/local/bin/ocamlc -c -g server.ml
/usr/local/bin/ocamlc -c -cc "gcc" -ccopt " -m32 -march=i686 -I
../../../tools/python/xen/lowlevel/xc -I ../../../tools/libxc -I
../libxendebug -I ./linux-2.6-module -I /usr/local/lib/ocaml -Wall
-Werror -g \
                         \
                           -o pdb_caml_xc.o " pdb_caml_xc.c
/usr/local/bin/ocamlc -c -cc "gcc" -ccopt " -m32 -march=i686 -I
../../../tools/python/xen/lowlevel/xc -I ../../../tools/libxc -I
../libxendebug -I ./linux-2.6-module -I /usr/local/lib/ocaml -Wall
-Werror -g \
                         \
                           -o pdb_caml_domain.o " pdb_caml_domain.c
cc1: warnings being treated as errors
pdb_caml_domain.c: In function 'dom_read_memory':
pdb_caml_domain.c:221: warning: pointer targets in passing argument 6 of
'xendebug_read_memory' differ in signedness
pdb_caml_domain.c: In function 'dom_write_memory':
pdb_caml_domain.c:285: warning: pointer targets in passing argument 6 of
'xendebug_write_memory' differ in signedness
make[1]: *** [pdb_caml_domain.o] Error 2
make[1]: Leaving directory
`/usr/src/xen-unstable.hg-20050930_orig/tools/debugger/pdb'
make: *** [debug-code] Error 2










Output of errors from missing xcs_proto.h:


root:01:21 AM:pdb $ make
make[1]: Entering directory
`/usr/src/xen-unstable.hg-20050930_orig/tools/debugger/pdb'
/usr/local/bin/ocamlc -c -cc "gcc" -ccopt " -m32 -march=i686 -I
../../../tools/python/xen/lowlevel/xc -I ../../../tools/libxc -I
../libxendebug -I ./linux-2.6-module -I /usr/local/lib/ocaml -Wall -g \
                         \
                           -o pdb_caml_domain.o " pdb_caml_domain.c
pdb_caml_domain.c: In function 'dom_read_memory':
pdb_caml_domain.c:221: warning: pointer targets in passing argument 6 of
'xendebug_read_memory' differ in signedness
pdb_caml_domain.c: In function 'dom_write_memory':
pdb_caml_domain.c:285: warning: pointer targets in passing argument 6 of
'xendebug_write_memory' differ in signedness
/usr/local/bin/ocamlc -c -cc "gcc" -ccopt " -m32 -march=i686 -I
../../../tools/python/xen/lowlevel/xc -I ../../../tools/libxc -I
../libxendebug -I ./linux-2.6-module -I /usr/local/lib/ocaml -Wall -g \
                         \
                           -o pdb_caml_process.o " pdb_caml_process.c
/usr/local/bin/ocamlc -c -cc "gcc" -ccopt " -m32 -march=i686 -I
../../../tools/python/xen/lowlevel/xc -I ../../../tools/libxc -I
../libxendebug -I ./linux- 2.6-module -I /usr/local/lib/ocaml -Wall -g \
                         \
                           -o pdb_caml_evtchn.o " pdb_caml_evtchn.c
/usr/local/bin/ocamlc -c -cc "gcc" -ccopt " -m32 -march=i686 -I
../../../tools/python/xen/lowlevel/xc -I ../../../tools/libxc -I
../libxendebug -I ./linux- 2.6-module -I /usr/local/lib/ocaml -Wall -g \
                         \
                           -o pdb_caml_xcs.o " pdb_caml_xcs.c
pdb_caml_xcs.c:27:23: error: xcs_proto.h: No such file or directory
pdb_caml_xcs.c: In function 'xcs_write_message':
pdb_caml_xcs.c:87: error: 'xcs_msg_t' undeclared (first use in this
function)
pdb_caml_xcs.c:87: error: (Each undeclared identifier is reported only once
pdb_caml_xcs.c:87: error: for each function it appears in.)
pdb_caml_xcs.c:87: error: syntax error before 'my_msg'
pdb_caml_xcs.c:90: error: 'my_msg' undeclared (first use in this function)
pdb_caml_xcs.c:90: error: 'XCS_REQUEST' undeclared (first use in this
function)
pdb_caml_xcs.c: In function 'xcs_read_message':
pdb_caml_xcs.c:120: error: 'xcs_msg_t' undeclared (first use in this
function)
pdb_caml_xcs.c:120: error: syntax error before 'msg'
pdb_caml_xcs.c:122: error: 'msg' undeclared (first use in this function)
pdb_caml_xcs.c:130: error: 'XCS_REQUEST' undeclared (first use in this
function)
pdb_caml_xcs.c:152: error: 'XCS_RESPONSE' undeclared (first use in this
function)
pdb_caml_xcs.c: In function 'xcs_connect':
pdb_caml_xcs.c:186: error: 'xcs_msg_t' undeclared (first use in this
function)
pdb_caml_xcs.c:186: error: syntax error before 'msg'
pdb_caml_xcs.c:208: error: 'msg' undeclared (first use in this function)
pdb_caml_xcs.c:208: error: 'XCS_CONNECT_CTRL' undeclared (first use in
this function)
pdb_caml_xcs.c:214: error: 'XCS_RSLT_OK' undeclared (first use in this
function)
pdb_caml_xcs.c:242: error: 'XCS_CONNECT_DATA' undeclared (first use in
this function)
pdb_caml_xcs.c:257: error: 'XCS_MSG_BIND' undeclared (first use in this
function)
pdb_caml_xcs.c:258: error: 'PORT_WILDCARD' undeclared (first use in this
function)
make[1]: *** [pdb_caml_xcs.o] Error 2
make[1]: Leaving directory
`/usr/src/xen-unstable.hg-20050930_orig/tools/debugger/pdb'
make: *** [debug-code] Error 2



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel







_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel