Hi, Did anybody consider adding some remote debugging facility to stubdom? Or maybe it''s already present? If not, putting in a GDB remote stub shouldn''t be too hard, though I don''t know much about the low level architecture. Such code is present in gPXE, for example. Usage docs: http://www.etherboot.org/wiki/dev/gdbstub Main code: http://git.etherboot.org/?p=gpxe.git;a=blob;f=src/core/gdbstub.c The transport could be some Xen specific channel between the stubdom and dom0 (that would be out of band and hopefully also easy to implement) translated to/from TCP by a proxy on dom0. (The official GDB example seems uglier: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/i386-stub.c?cvsroot=src) -- Regards, Feri. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, 2009-04-30 at 07:37 -0400, Ferenc Wagner wrote:> Hi, > > Did anybody consider adding some remote debugging facility to stubdom? > Or maybe it''s already present? If not, putting in a GDB remote stub > shouldn''t be too hard, though I don''t know much about the low level > architecture. Such code is present in gPXE, for example.I think gdbserver-xen should be able to debug a stub dom just like any other. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell <Ian.Campbell@citrix.com> writes:> On Thu, 2009-04-30 at 07:37 -0400, Ferenc Wagner wrote: > >> Did anybody consider adding some remote debugging facility to stubdom? >> Or maybe it''s already present? If not, putting in a GDB remote stub >> shouldn''t be too hard, though I don''t know much about the low level >> architecture. Such code is present in gPXE, for example. > > I think gdbserver-xen should be able to debug a stub dom just like any > other.Thanks, I haven''t yet heard about it. I''d try it if it compiled, but apparently I''m missing something (Xen-3.3.1, still :): In file included from ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:38: ../../../../../libxc/xenctrl.h:36:32: error: xen/foreign/x86_32.h: No such file or directory ../../../../../libxc/xenctrl.h:37:32: error: xen/foreign/x86_64.h: No such file or directory In file included from ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:38: ../../../../../libxc/xenctrl.h:175: error: expected specifier-qualifier-list before ‘vcpu_guest_context_x86_64_t’ ../../../../../libxc/xenctrl.h:184: error: expected specifier-qualifier-list before ‘shared_info_x86_64_t’ ../../../../../libxc/xenctrl.h:193: error: expected specifier-qualifier-list before ‘start_info_x86_64_t’ ../../../../../libxc/xenctrl.h:966: error: expected declaration specifiers or ‘...’ before ‘hvmmem_type_t’ That foreign directory is definitely not there... -- Feri. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
2009-Apr-30 13:24 UTC
Re: [Xen-devel] Re: GDB stub for stubdom
Am Donnerstag, den 30.04.2009, 15:01 +0200 schrieb Ferenc Wagner:> Ian Campbell <Ian.Campbell@citrix.com> writes: > > > On Thu, 2009-04-30 at 07:37 -0400, Ferenc Wagner wrote: > > > >> Did anybody consider adding some remote debugging facility to stubdom? > >> Or maybe it''s already present? If not, putting in a GDB remote stub > >> shouldn''t be too hard, though I don''t know much about the low level > >> architecture. Such code is present in gPXE, for example. > > > > I think gdbserver-xen should be able to debug a stub dom just like any > > other. > > Thanks, I haven''t yet heard about it. I''d try it if it compiled, but > apparently I''m missing something (Xen-3.3.1, still :): > > In file included from ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:38: > ../../../../../libxc/xenctrl.h:36:32: error: xen/foreign/x86_32.h: No such file or directory > ../../../../../libxc/xenctrl.h:37:32: error: xen/foreign/x86_64.h: No such file or directory > In file included from ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:38: > ../../../../../libxc/xenctrl.h:175: error: expected specifier-qualifier-list before ‘vcpu_guest_context_x86_64_t’ > ../../../../../libxc/xenctrl.h:184: error: expected specifier-qualifier-list before ‘shared_info_x86_64_t’ > ../../../../../libxc/xenctrl.h:193: error: expected specifier-qualifier-list before ‘start_info_x86_64_t’ > ../../../../../libxc/xenctrl.h:966: error: expected declaration specifiers or ‘...’ before ‘hvmmem_type_t’ > > That foreign directory is definitely not there...You have to build the rest of the tree first. There should be a README file... Builds fine here. Marc _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell, le Thu 30 Apr 2009 13:12:32 +0100, a écrit :> On Thu, 2009-04-30 at 07:37 -0400, Ferenc Wagner wrote: > > Did anybody consider adding some remote debugging facility to stubdom? > > Or maybe it''s already present? If not, putting in a GDB remote stub > > shouldn''t be too hard, though I don''t know much about the low level > > architecture. Such code is present in gPXE, for example. > > I think gdbserver-xen should be able to debug a stub dom just like any > other.Yes (apart from its limitations, like 32/64 bit incompatibilities) Samuel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
"Marc - A. Dahlhaus [ Administration | Westermann GmbH ]" <mad@wol.de> writes:> Am Donnerstag, den 30.04.2009, 15:01 +0200 schrieb Ferenc Wagner: > >> That foreign directory is definitely not there... > > You have to build the rest of the tree first. There should be a README > file... Builds fine here.Yes, indeed the README mentions that. Too bad it required Python.h, but didn''t check for its presence (not even the development version). Anyway, after fixing this the directory symlink appears, but still: gcc -c -Wall -g -O2 -I. -I../../../gdb-6.2.1/gdb/gdbserver -I../../../gdb-6.2.1/gdb/gdbserver/../regformats -I../../../gdb-6.2.1/gdb/gdbserver/../../include -I../../../../../libxc/ -I../../bfd -I../../../gdb-6.2.1/gdb/gdbserver/../../bfd ../../../gdb-6.2.1/gdb/gdbserver/linux-i386-low.c In file included from ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:38: ../../../../../libxc/xenctrl.h:36:32: error: xen/foreign/x86_32.h: No such file or directory ../../../../../libxc/xenctrl.h:37:32: error: xen/foreign/x86_64.h: No such file or directory [...] make[3]: Leaving directory `/home/wferi/xen/xen-3.3.1/tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/gdb/gdbserver'' That is, tools/include/xen/foreign is not amongst the include paths. I''m persuaded to try the unstable tree, where this works all right. You (or at least Samuel) won! :) -- Cheers, Feri. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel