* debugging libxc / builders
@ 2005-06-23 3:48 Tim Newsham
2005-06-23 3:55 ` Anthony Liguori
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Tim Newsham @ 2005-06-23 3:48 UTC (permalink / raw)
To: xen-devel
Hi,
I'm playing with the builders in libxc. I am having trouble
debugging the thing. I was wondering what options I have.
- When I run 'xm create', what process calls down to the
xc_builder stuff? Can I attach to it with gdb?
- Is there any way to spit out debug output (printf?)? Where
would it go?
- If I make changes and do a make install in tools, what do
I have to restart to put the new code into use? xend restart?
Any hints or tips appreciated.
Tim Newsham
http://www.lava.net/~newsham/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: debugging libxc / builders
2005-06-23 3:48 debugging libxc / builders Tim Newsham
@ 2005-06-23 3:55 ` Anthony Liguori
2005-06-23 3:59 ` Kip Macy
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2005-06-23 3:55 UTC (permalink / raw)
To: Tim Newsham; +Cc: xen-devel
Tim Newsham wrote:
> Hi,
> I'm playing with the builders in libxc. I am having trouble
> debugging the thing. I was wondering what options I have.
>
> - When I run 'xm create', what process calls down to the
> xc_builder stuff? Can I attach to it with gdb?
Xend (the daemon) actually calls the xc_XXX_build function. The C
invocation occurs in the xc bindings. I'm not aware of an easy way to
attach to bindings with gdb (although I presume it's possible).
> Any hints or tips appreciated.
It would probably be significantly easier to debug builder issues with
VM-Tools. There's a single executable (vm-build.linux for instance)
that only does building and can be stepped through with gdb.
Of course, you could also write your own really simple app with libxc
that just did a few calls to create and build the domain. You don't
need any of the control channel stuff until the domain starts to
actually boot.
I can give you a more detailed example if you need.
Regards,
Anthony Liguori
> Tim Newsham
> http://www.lava.net/~newsham/
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: debugging libxc / builders
2005-06-23 3:48 debugging libxc / builders Tim Newsham
2005-06-23 3:55 ` Anthony Liguori
@ 2005-06-23 3:59 ` Kip Macy
2005-06-23 4:35 ` Ronald G. Minnich
2005-06-23 16:45 ` Mark Williamson
3 siblings, 0 replies; 5+ messages in thread
From: Kip Macy @ 2005-06-23 3:59 UTC (permalink / raw)
To: Tim Newsham; +Cc: xen-devel
I've had to do this a number of times. Build libxc with symbols,
install and then restart xend. Attach to the python process with gdb.
This has gotten a tad bit harder now that xend is multiple threads as
you have figure out which to attach to.
-Kip
On 6/22/05, Tim Newsham <newsham@lava.net> wrote:
> Hi,
> I'm playing with the builders in libxc. I am having trouble
> debugging the thing. I was wondering what options I have.
>
> - When I run 'xm create', what process calls down to the
> xc_builder stuff? Can I attach to it with gdb?
> - Is there any way to spit out debug output (printf?)? Where
> would it go?
> - If I make changes and do a make install in tools, what do
> I have to restart to put the new code into use? xend restart?
>
> Any hints or tips appreciated.
>
> Tim Newsham
> http://www.lava.net/~newsham/
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: debugging libxc / builders
2005-06-23 3:48 debugging libxc / builders Tim Newsham
2005-06-23 3:55 ` Anthony Liguori
2005-06-23 3:59 ` Kip Macy
@ 2005-06-23 4:35 ` Ronald G. Minnich
2005-06-23 16:45 ` Mark Williamson
3 siblings, 0 replies; 5+ messages in thread
From: Ronald G. Minnich @ 2005-06-23 4:35 UTC (permalink / raw)
To: Tim Newsham; +Cc: xen-devel
On Wed, 22 Jun 2005, Tim Newsham wrote:
> - When I run 'xm create', what process calls down to the
> xc_builder stuff? Can I attach to it with gdb?
IIRC this is a long path that goes through python. I punted.
> - Is there any way to spit out debug output (printf?)? Where
> would it go?
While debugging plan 9 loader, I just opened files in that function and
dumped debug into that.
> - If I make changes and do a make install in tools, what do
> I have to restart to put the new code into use? xend restart?
so you remake the world, in essence? I would always do an xend restart.
ron
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: debugging libxc / builders
2005-06-23 3:48 debugging libxc / builders Tim Newsham
` (2 preceding siblings ...)
2005-06-23 4:35 ` Ronald G. Minnich
@ 2005-06-23 16:45 ` Mark Williamson
3 siblings, 0 replies; 5+ messages in thread
From: Mark Williamson @ 2005-06-23 16:45 UTC (permalink / raw)
To: xen-devel; +Cc: Tim Newsham
> - When I run 'xm create', what process calls down to the
> xc_builder stuff? Can I attach to it with gdb?
It gets called from Xend (from a thread in Xend, if you're using unstable).
You might be able to attach using gdb... Not sure how easy it would be to do
something useful.
> - Is there any way to spit out debug output (printf?)? Where
> would it go?
I fprintf to stderr, with the output appearing magically
in /var/log/xend-debug.log
> - If I make changes and do a make install in tools, what do
> I have to restart to put the new code into use? xend restart?
Restarting Xend should be OK.
HTH,
Mark
> Any hints or tips appreciated.
>
> Tim Newsham
> http://www.lava.net/~newsham/
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-06-23 16:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-23 3:48 debugging libxc / builders Tim Newsham
2005-06-23 3:55 ` Anthony Liguori
2005-06-23 3:59 ` Kip Macy
2005-06-23 4:35 ` Ronald G. Minnich
2005-06-23 16:45 ` Mark Williamson
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.