All of lore.kernel.org
 help / color / mirror / Atom feed
* GDB stub for stubdom
@ 2009-04-30 11:37 Ferenc Wagner
  2009-04-30 12:12 ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Ferenc Wagner @ 2009-04-30 11:37 UTC (permalink / raw)
  To: xen-devel

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB stub for stubdom
  2009-04-30 11:37 GDB stub for stubdom Ferenc Wagner
@ 2009-04-30 12:12 ` Ian Campbell
  2009-04-30 13:01   ` Ferenc Wagner
  2009-04-30 14:43   ` Samuel Thibault
  0 siblings, 2 replies; 6+ messages in thread
From: Ian Campbell @ 2009-04-30 12:12 UTC (permalink / raw)
  To: Ferenc Wagner; +Cc: 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB stub for stubdom
  2009-04-30 12:12 ` Ian Campbell
@ 2009-04-30 13:01   ` Ferenc Wagner
  2009-04-30 13:24     ` Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
  2009-04-30 14:43   ` Samuel Thibault
  1 sibling, 1 reply; 6+ messages in thread
From: Ferenc Wagner @ 2009-04-30 13:01 UTC (permalink / raw)
  To: Ian Campbell; +Cc: 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: GDB stub for stubdom
  2009-04-30 13:01   ` Ferenc Wagner
@ 2009-04-30 13:24     ` Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
  2009-04-30 15:45       ` Ferenc Wagner
  0 siblings, 1 reply; 6+ messages in thread
From: Marc - A. Dahlhaus [ Administration | Westermann GmbH ] @ 2009-04-30 13:24 UTC (permalink / raw)
  To: Ferenc Wagner; +Cc: xen-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB stub for stubdom
  2009-04-30 12:12 ` Ian Campbell
  2009-04-30 13:01   ` Ferenc Wagner
@ 2009-04-30 14:43   ` Samuel Thibault
  1 sibling, 0 replies; 6+ messages in thread
From: Samuel Thibault @ 2009-04-30 14:43 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ferenc Wagner, 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: GDB stub for stubdom
  2009-04-30 13:24     ` Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
@ 2009-04-30 15:45       ` Ferenc Wagner
  0 siblings, 0 replies; 6+ messages in thread
From: Ferenc Wagner @ 2009-04-30 15:45 UTC (permalink / raw)
  To: Marc - A. Dahlhaus [ Administration | Westermann GmbH ]; +Cc: 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-04-30 15:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-30 11:37 GDB stub for stubdom Ferenc Wagner
2009-04-30 12:12 ` Ian Campbell
2009-04-30 13:01   ` Ferenc Wagner
2009-04-30 13:24     ` Marc - A. Dahlhaus [ Administration | Westermann GmbH ]
2009-04-30 15:45       ` Ferenc Wagner
2009-04-30 14:43   ` Samuel Thibault

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.