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@lists.xensource.com http://lists.xensource.com/xen-devel
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 <http://Rules.mk>. -Kip On 9/29/05, Jonathan M. McCune <jonmccune@cmu.edu> 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 <http://server.ml> > making ._d/debugger.d from debugger.ml <http://debugger.ml> > making ._d/PDB.d from PDB.ml > making ._d/Process.d from Process.ml <http://Process.ml> > making ._d/Domain.d from Domain.ml <http://Domain.ml> > making ._d/Xen_domain.d from Xen_domain.ml > making ._d/xcs.d from xcs.ml <http://xcs.ml> > making ._d/evtchn.d from evtchn.ml <http://evtchn.ml> > making ._d/Intel.d from Intel.ml <http://Intel.ml> > making ._d/Util.d from Util.ml <http://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 <http://Util.ml> > /usr/local/bin/ocamlc -c -g Intel.ml <http://Intel.ml> > /usr/local/bin/ocamlc -c -g evtchn.mli > /usr/local/bin/ocamlc -c -g evtchn.ml <http://evtchn.ml> > /usr/local/bin/ocamlc -c -g xcs.mli > /usr/local/bin/ocamlc -c -g xcs.ml <http://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 <http://Domain.ml> > /usr/local/bin/ocamlc -c -g Process.mli > /usr/local/bin/ocamlc -c -g Process.ml <http://Process.ml> > /usr/local/bin/ocamlc -c -g PDB.ml > /usr/local/bin/ocamlc -c -g debugger.ml <http://debugger.ml> > /usr/local/bin/ocamlc -c -g server.ml <http://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@lists.xensource.com > http://lists.xensource.com/xen-devel > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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@cmu.edu> 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@lists.xensource.com > http://lists.xensource.com/xen-devel > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 <http://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@cmu.edu> wrote:> > Thanks Kip. > Here are the settings from my Rules.mk <http://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 <http://Rules.mk>. > > -Kip > > > > On 9/29/05, Jonathan M. McCune <jonmccune@cmu.edu> 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 > > <http://www.cl.cam.ac.uk/%7Esos22/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 <http://server.ml> > > making ._d/debugger.d from debugger.ml <http://debugger.ml> > > making ._d/PDB.d from PDB.ml > > making ._d/Process.d from Process.ml <http://Process.ml> > > making ._d/Domain.d from Domain.ml <http://Domain.ml> > > making ._d/Xen_domain.d from Xen_domain.ml > > making ._d/xcs.d from xcs.ml <http://xcs.ml> > > making ._d/evtchn.d from evtchn.ml <http://evtchn.ml> > > making ._d/Intel.d from Intel.ml <http://Intel.ml> > > making ._d/Util.d from Util.ml <http://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 <http://Util.ml> > > /usr/local/bin/ocamlc -c -g Intel.ml <http://Intel.ml> > > /usr/local/bin/ocamlc -c -g evtchn.mli > > /usr/local/bin/ocamlc -c -g evtchn.ml <http://evtchn.ml> > > /usr/local/bin/ocamlc -c -g xcs.mli > > /usr/local/bin/ocamlc -c -g xcs.ml <http://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 <http://Domain.ml> > > /usr/local/bin/ocamlc -c -g Process.mli > > /usr/local/bin/ocamlc -c -g Process.ml <http://Process.ml> > > /usr/local/bin/ocamlc -c -g PDB.ml > > /usr/local/bin/ocamlc -c -g debugger.ml <http://debugger.ml> > > /usr/local/bin/ocamlc -c -g server.ml <http://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@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > > > > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 user: kaf24@firebug.cl.cam.ac.uk 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@cmu.edu> 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@cmu.edu> 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@lists.xensource.com >> http://lists.xensource.com/xen-devel >> >> >> >> > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jonathan - crash_debug is intended for debugging xen and dom0 and last I looked is not restartable, domu_debug is only for debugging domains other than dom0. domu_debug is obviously what you want. Good luck. One other advance warning... Although VT and 64-bit support have been added, I don't think that anyone has gotten around to adding SMP support to gdbserver-xen. Fortunately, the last time I was thinking about this sort of thing my attention stayed focused long enough to get the DOM0 debugging interfaces re-factored to support it. How motivated I am will depend very much on how much time I get to work on FreeBSD (where I would care about debugging SMP issues). There is also a bug that will cause gdbserver-xen to crash sometimes in VA mapping code. It is trivially fixable by adding an additional check in the page lookup. A patch was submitted but not accepted because the check "should be redundant". -Kip On 9/30/05, Jonathan McCune <jonmccune@cmu.edu> wrote:> > 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 > user: kaf24@firebug.cl.cam.ac.uk > 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 <http://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@cmu.edu> wrote: > > > > Thanks Kip. > > Here are the settings from my Rules.mk <http://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 <http://Rules.mk>. > > > > -Kip > > > > > > > > On 9/29/05, Jonathan M. McCune <jonmccune@cmu.edu> 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 > > > <http://www.cl.cam.ac.uk/%7Esos22/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 <http://server.ml> > > > making ._d/debugger.d from debugger.ml <http://debugger.ml> > > > making ._d/PDB.d from PDB.ml > > > making ._d/Process.d from Process.ml <http://Process.ml> > > > making ._d/Domain.d from Domain.ml <http://Domain.ml> > > > making ._d/Xen_domain.d from Xen_domain.ml > > > making ._d/xcs.d from xcs.ml <http://xcs.ml> > > > making ._d/evtchn.d from evtchn.ml <http://evtchn.ml> > > > making ._d/Intel.d from Intel.ml <http://Intel.ml> > > > making ._d/Util.d from Util.ml <http://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 <http://Util.ml> > > > /usr/local/bin/ocamlc -c -g Intel.ml <http://Intel.ml> > > > /usr/local/bin/ocamlc -c -g evtchn.mli > > > /usr/local/bin/ocamlc -c -g evtchn.ml <http://evtchn.ml> > > > /usr/local/bin/ocamlc -c -g xcs.mli > > > /usr/local/bin/ocamlc -c -g xcs.ml <http://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 <http://Domain.ml> > > > /usr/local/bin/ocamlc -c -g Process.mli > > > /usr/local/bin/ocamlc -c -g Process.ml <http://Process.ml> > > > /usr/local/bin/ocamlc -c -g PDB.ml > > > /usr/local/bin/ocamlc -c -g debugger.ml <http://debugger.ml> > > > /usr/local/bin/ocamlc -c -g server.ml <http://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@lists.xensource.com > > > http://lists.xensource.com/xen-devel > > > > > > > > > > > > > > > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 9/30/05, Jonathan M. McCune <jonmccune@cmu.edu> 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?Yes, certainly it is. PDB relies on xcs to pass message control, but since when xcs has been removed, nobody updates PDB to catch up the change. PDB should now exploit the xenstore interface. Hieu. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
What PDB brings to the table is the ability to debug several domains at once (think clustering). For his needs gdbserver-xen will likely suffice. -Kip> Yes, certainly it is. > > PDB relies on xcs to pass message control, but since when xcs has been > removed, nobody updates PDB to catch up the change. > > PDB should now exploit the xenstore interface. > > Hieu. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Kip, gdbserver-xen is behaving as I expect, now that I''ve turned off crash_debug in Rules.mk. Thanks again for your helpful suggestions. Indeed, I am interested in debugging domU. However, the domU kernel I''ve built is crashing and / or xend is crashing before the domain can even be started "paused". I can boot an unmodified domU (except for turning on the appropriate debug options) and debug as expected. However, the kernel I am interested in debugging is causing xend to crash, which apparently results in errors from xm. Upon a restart of xend, `xm list` doesn''t show any new domains. Other utilities do, though, more on this in a sec... xm complains about http errors when I try to create a domU with my debug kernel from the dom0 console. When xm complains like this, xend crashes. When I restart xend, `xm list` does not show the new domain. However, `xm top` does show that domain, the memory it uses, and its status is "paused". Further, if I use the Ctrl+A Ctrl+A Ctrl+A Xen console via serial cable, and select option ''q'' (dump task queues + guest state), the new domain appears. If I try to use gdbserver-xen to connect to one of my invisible-to-xm-list domains, gdbserver-xen segfaults once gdb connects to it. I believe this is interesting because gdbserver-xen will complain about nonexistant domains if I pass it a domain id which has never been used this boot cycle. If I pass it a domain which ran successfully, but has shutdown, it says "getdomaininfo failed". Hence, I believe the segfault of gdbserver-xen is directly related to the changes I''ve made to the kernel I want to debug. I''m not sure if this a bug in xm or xend, or if it is an artifact of a bad modification that I''ve made to the kernel I''m trying to debug. I have included the output from `xm` and the output from ''q'': Any ideas? Thanks, -Jon root:11:56 AM:xen_conf $ xm create -p ttylinux.xm Using config file "ttylinux.xm". Unexpected error: httplib.BadStatusLine Please report to xen-devel@lists.xensource.com Traceback (most recent call last): File "/usr/sbin/xm", line 10, in ? main.main(sys.argv) File "/usr/lib/python/xen/xm/main.py", line 683, in main rc = cmd(args) File "<string>", line 1, in <lambda> File "/usr/lib/python/xen/xm/main.py", line 304, in xm_subcommand cmd.main(["bogus"] + args) File "/usr/lib/python/xen/xm/create.py", line 838, in main dom = make_domain(opts, config) File "/usr/lib/python/xen/xm/create.py", line 738, in make_domain dominfo = server.xend_domain_create(config) File "/usr/lib/python/xen/xend/XendClient.py", line 201, in xend_domain_create {''op'' : ''create'', File "/usr/lib/python/xen/xend/XendClient.py", line 153, in xendPost return self.client.xendPost(url, data) File "/usr/lib/python/xen/xend/XendProtocol.py", line 101, in xendPost return self.xendRequest(url, "POST", args) File "/usr/lib/python/xen/xend/XendProtocol.py", line 172, in xendRequest resp = conn.getresponse() File "/usr/lib/python2.3/httplib.py", line 781, in getresponse response.begin() File "/usr/lib/python2.3/httplib.py", line 273, in begin version, status, reason = self._read_status() File "/usr/lib/python2.3/httplib.py", line 237, in _read_status raise BadStatusLine(line) httplib.BadStatusLine (XEN) ''q'' pressed -> dumping task queues (now=0x1DD:43C5E37C) (XEN) Xen: DOM 0, flags=d refcnt=3 nr_pages=116912 xenheap_pages=5 (XEN) XenPage 001c8000: caf=80000002, taf=f0000002 (XEN) XenPage 001c9000: caf=80000002, taf=f0000002 (XEN) XenPage 001ca000: caf=80000002, taf=f0000002 (XEN) XenPage 001cb000: caf=80000002, taf=f0000002 (XEN) XenPage 001df000: caf=80000002, taf=f0000002 (XEN) Shared_info@001df000: caf=80000002, taf=f0000002 (XEN) Guest: ff1c6080 CPU 0 [has=F] flags=3 upcall_pend = 01, upcall_mask = 00 (XEN) Notifying guest... 0/0 (XEN) port 1/4 stat 0 0 -1 (XEN) Xen: DOM 1, flags=0 refcnt=3 nr_pages=2560 xenheap_pages=5 (XEN) XenPage 001d0000: caf=80000001, taf=f0000001 (XEN) XenPage 001d1000: caf=80000001, taf=f0000001 (XEN) XenPage 001d2000: caf=80000001, taf=f0000001 (XEN) XenPage 001d3000: caf=80000001, taf=f0000001 (XEN) XenPage 001d4000: caf=80000001, taf=f0000001 (XEN) Shared_info@001d4000: caf=80000001, taf=f0000001 (XEN) Guest: ff1d6080 CPU 0 [has=F] flags=10 upcall_pend = 00, upcall_mask = 00 (XEN) Notifying guest... 1/0 (XEN) port 1/0 stat 0 0 0 Kip Macy wrote:>What PDB brings to the table is the ability to debug several domains at once >(think clustering). For his needs gdbserver-xen will likely suffice. > >-Kip > > > > > >>Yes, certainly it is. >> >>PDB relies on xcs to pass message control, but since when xcs has been >>removed, nobody updates PDB to catch up the change. >> >>PDB should now exploit the xenstore interface. >> >>Hieu. >> >>_______________________________________________ >>Xen-devel mailing list >>Xen-devel@lists.xensource.com >>http://lists.xensource.com/xen-devel >> >> >>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, Sep 30, 2005 at 12:15:04PM -0400, Jonathan M. McCune wrote:> root:11:56 AM:xen_conf $ xm create -p ttylinux.xm > Using config file "ttylinux.xm". > Unexpected error: httplib.BadStatusLineThis suggests that xend is bombing out with some fatal error, such that it doesn''t even manage to get a response to xm (it''s pretty bad about that at the moment). Take a look in /var/log/xend-debug.log, and if not there, /var/log/xend.log. Also, today''s changes may help with the problem of xm list not showing your domain. Try them and let me know if there''s any improvement. Your two xend logs should help to diagnose this problem, if it still persists. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jonathan - gdbserver-xen is behaving as I expect, now that I've turned off> crash_debug in Rules.mk <http://Rules.mk>. Thanks again for your helpful > suggestions. > Indeed, I am interested in debugging domU. However, the domU kernel > I've built is crashing and / or xend is crashing before the domain can > even be started "paused".Are you passing -p to "xm create"? If so, it is a xend problem, because that will pause the OS before the *first instruction*. However, it shouldn't be causing xend to crash until it gets to the xenbus init code. If I try to use gdbserver-xen to connect to one of my> invisible-to-xm-list domains, gdbserver-xen segfaults once gdb connects > to it. I believe this is interesting because gdbserver-xen will > complain about nonexistant domains if I pass it a domain id which has > never been used this boot cycle. If I pass it a domain which ran > successfully, but has shutdown, it says "getdomaininfo failed". Hence, > I believe the segfault of gdbserver-xen is directly related to the > changes I've made to the kernel I want to debug.Could you send me the output from the two different runs? Odds are the segfault is easily fixable. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Kip, I am passing -p to `xm create`. I updated to today''s xen-unstable.hg, and it seems to have fixed the problem with `xm list`... the domU does show up paused. However, its creation still crashes xend (an unmodified domU w/ debug enabled does not crash xend). But with xend restarted, my modified domU kernel will show up as paused, so I kept going... The next obstacle is that gdbserver-xen is segfaulting upon connection from gdb in dom0. Again, this works great with an unmodified domU. You asked me to give the output from the two different runs of gdbserver-xen. Crash output: root:04:20 PM:root $ ./gdbserver-xen 127.0.0.1:9999 --attach 2 domain currently paused Attached; pid = 2 Listening on port 9999 Remote debugging from host 127.0.0.1 Segmentation fault (core dumped) Normal output: root:04:23 PM:root $ ./gdbserver-xen 127.0.0.1:9999 --attach 3 domain currently paused Attached; pid = 3 Listening on port 9999 Remote debugging from host 127.0.0.1 Here''s the backtrace from the core file (which I have attached): Thanks yet again, :-) -Jon root:04:25 PM:root $ gdb gdbserver-xen (gdb) core core Core was generated by `./gdbserver-xen 127.0.0.1:9999 --attach 2''. Program terminated with signal 11, Segmentation fault. warning: current_sos: Can''t read pathname for load map: Input/output error Reading symbols from /usr/lib/libxenctrl.so.3.0...done. Loaded symbols for /usr/lib/libxenctrl.so.3.0 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0x40021fb4 in map_domain_va () from /usr/lib/libxenctrl.so.3.0 (gdb) bt #0 0x40021fb4 in map_domain_va () from /usr/lib/libxenctrl.so.3.0 #1 0x4002268a in xc_ptrace () from /usr/lib/libxenctrl.so.3.0 #2 0x0804cb27 in linux_read_memory (memaddr=0, myaddr=0xbff5ab50 "", len=8) at ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:394 #3 0x0804bd41 in read_inferior_memory (memaddr=The value of variable ''memaddr'' is distributed across several locations, and GDB cannot access its value. ) at ../../../gdb-6.2.1/gdb/gdbserver/target.c:64 #4 0x0804b41b in main (argc=4, argv=0xbff5b3a4) at ../../../gdb-6.2.1/gdb/gdbserver/server.c:483 Kip Macy wrote:>Jonathan - > >gdbserver-xen is behaving as I expect, now that I''ve turned off > > >>crash_debug in Rules.mk <http://Rules.mk>. Thanks again for your helpful >>suggestions. >>Indeed, I am interested in debugging domU. However, the domU kernel >>I''ve built is crashing and / or xend is crashing before the domain can >>even be started "paused". >> >> > > >Are you passing -p to "xm create"? If so, it is a xend problem, because that >will pause the OS before the *first instruction*. However, it shouldn''t be >causing xend to crash until it gets to the xenbus init code. > >If I try to use gdbserver-xen to connect to one of my > > >>invisible-to-xm-list domains, gdbserver-xen segfaults once gdb connects >>to it. I believe this is interesting because gdbserver-xen will >>complain about nonexistant domains if I pass it a domain id which has >>never been used this boot cycle. If I pass it a domain which ran >>successfully, but has shutdown, it says "getdomaininfo failed". Hence, >>I believe the segfault of gdbserver-xen is directly related to the >>changes I''ve made to the kernel I want to debug. >> >> > > >Could you send me the output from the two different runs? Odds are the >segfault is easily fixable. > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> The next obstacle is that gdbserver-xen is segfaulting upon connection > from gdb in dom0. Again, this works great with an unmodified domU. You > asked me to give the output from the two different runs of gdbserver-xen.I actually meant when you gave it an invalid domain id, but that isn't a key issue ... #0 0x40021fb4 in map_domain_va () from /usr/lib/libxenctrl.so.3.0> (gdb) bt > #0 0x40021fb4 in map_domain_va () from /usr/lib/libxenctrl.so.3.0 > #1 0x4002268a in xc_ptrace () from /usr/lib/libxenctrl.so.3.0 > #2 0x0804cb27 in linux_read_memory (memaddr=0, myaddr=0xbff5ab50 "", > len=8) > at ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:394 > #3 0x0804bd41 in read_inferior_memory (memaddr=The value of variable > 'memaddr' is distributed across several > locations, and GDB cannot access its value.That is a rather strange place for it to be blowing up. In the past there were cases where it would blow up in xc_ptrace when it tried to dereference an address that had not been successfully mapped to. In principle using alloca could bite you if len were so long that you ran off your stack, but you have a small stack and you're only reading 8 bytes. I'll see if I can determine any more by spelunking at the assembly level. Just to confirm that I'm looking at the same code, is your line 394: buffer[i] = myptrace (xc_handle, PTRACE_PEEKTEXT, inferior_pid, (PTRACE_ARG3_TYPE) addr, 0); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Kip, Yes, that''s exactly my line 394. And, just for completeness, root:05:10 PM:root $ ./gdbserver-xen 127.0.0.1:9999 --attach 10 dom0 op failed: No such process Cannot attach to domain 10: Illegal seek (29) Thanks, -Jon Kip Macy wrote:>>The next obstacle is that gdbserver-xen is segfaulting upon connection >>from gdb in dom0. Again, this works great with an unmodified domU. You >>asked me to give the output from the two different runs of gdbserver-xen. >> >> > > >I actually meant when you gave it an invalid domain id, but that isn''t a key >issue ... > > >#0 0x40021fb4 in map_domain_va () from /usr/lib/libxenctrl.so.3.0 > > >>(gdb) bt >>#0 0x40021fb4 in map_domain_va () from /usr/lib/libxenctrl.so.3.0 >>#1 0x4002268a in xc_ptrace () from /usr/lib/libxenctrl.so.3.0 >>#2 0x0804cb27 in linux_read_memory (memaddr=0, myaddr=0xbff5ab50 "", >>len=8) >>at ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:394 >>#3 0x0804bd41 in read_inferior_memory (memaddr=The value of variable >>''memaddr'' is distributed across several >>locations, and GDB cannot access its value. >> >> > > >That is a rather strange place for it to be blowing up. In the past there >were cases where it would blow up in xc_ptrace when it tried to dereference >an address that had not been successfully mapped to. In principle using >alloca could bite you if len were so long that you ran off your stack, but >you have a small stack and you''re only reading 8 bytes. I''ll see if I can >determine any more by spelunking at the assembly level. > >Just to confirm that I''m looking at the same code, is your line 394: > >buffer[i] = myptrace (xc_handle, PTRACE_PEEKTEXT, inferior_pid, >(PTRACE_ARG3_TYPE) addr, 0); > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 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-HOWTOThat document is horribly out of date, and will cause you nothing but pain. Steven. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Reasonably Related Threads
- [Fwd: [Xen-changelog] Move xcs to unix domain sockets.]
- [libnbd PATCH] build: Fix OCaml build on Fedora 29
- [PATCH 1/2] tools: Link OCaml programs with -runtime-variant _pic if available.
- [PATCH] Makefile uninstall not to remove libxutil
- [common PATCH] mlv2v: build as OCaml library