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
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 >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/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 >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> - 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_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel