Hello, I modify my xen tools code for my own function.(xc_restore code) But, my code have bugs and it doesn''t work. I want to use gdb to fix my functions. But, xc_restore is called by Xen. So, I can''t attatch to gdb. Is there any way to use gdb? Thank you for reading. _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Tue, Jul 09, 2013 at 01:29:20PM +0900, 이영준 wrote:> Hello, I modify my xen tools code for my own function.(xc_restore code) > > But, my code have bugs and it doesn't work. I want to use gdb to fix my > functions. But, xc_restore is called by Xen. So, I can't attatch to gdb. > > Is there any way to use gdb? >Have you checked gdbsx? BTW, this is a pretty vague question. You might have better luck asking a more specific question on Xen-devel. Wei.> Thank you for reading.> _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Tue, 2013-07-09 at 09:32 +0100, Wei Liu wrote:> On Tue, Jul 09, 2013 at 01:29:20PM +0900, 이영준 wrote: > > Hello, I modify my xen tools code for my own function.(xc_restore code) > > > > But, my code have bugs and it doesn't work. I want to use gdb to fix my > > functions. But, xc_restore is called by Xen. So, I can't attatch to gdb. > > > > Is there any way to use gdb? > > > > Have you checked gdbsx?gdbsx is for debugging guests. xc_restore is a userlevel toolstack bit of code. It's not clear to me why gdb can't be used on it -- nor what "xc_restore is called by Xen" means -- it is called from the toolstack. 이영준, have you tried simply running gdb on your toolstack? Perhaps if you tell us explicitly what commands you are running we will be better able to advise. Ian.> > BTW, this is a pretty vague question. You might have better luck asking > a more specific question on Xen-devel. > > > Wei. > > > Thank you for reading. > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xen.org > > http://lists.xen.org/xen-users > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Thank you for your answer. I want to send my active machines extra information at Migration time. So, I modify xc_domain_save and restore code. But, xc_restore process occur segfault when migration is starting.(about one or two second.) So, I can''t use gdb with xc_restore''s PID. I think I can check it''s PID with adding very long sleep code infront of xc_domain_restore''s loop code. But I don''t think this way is smart way. Sorry for my vague answer. 2013/7/9 Ian Campbell <ian.campbell@citrix.com>> On Tue, 2013-07-09 at 09:32 +0100, Wei Liu wrote: > > On Tue, Jul 09, 2013 at 01:29:20PM +0900, 이영준 wrote: > > > Hello, I modify my xen tools code for my own function.(xc_restore code) > > > > > > But, my code have bugs and it doesn''t work. I want to use gdb to fix my > > > functions. But, xc_restore is called by Xen. So, I can''t attatch to > gdb. > > > > > > Is there any way to use gdb? > > > > > > > Have you checked gdbsx? > > gdbsx is for debugging guests. xc_restore is a userlevel toolstack bit > of code. It''s not clear to me why gdb can''t be used on it -- nor what > "xc_restore is called by Xen" means -- it is called from the toolstack. > > 이영준, have you tried simply running gdb on your toolstack? Perhaps if > you tell us explicitly what commands you are running we will be better > able to advise. > > Ian. > > > > > BTW, this is a pretty vague question. You might have better luck asking > > a more specific question on Xen-devel. > > > > > > Wei. > > > > > Thank you for reading. > > > > > _______________________________________________ > > > Xen-users mailing list > > > Xen-users@lists.xen.org > > > http://lists.xen.org/xen-users > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xen.org > > http://lists.xen.org/xen-users > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Tue, 2013-07-09 at 19:10 +0900, 이영준 wrote:> But, xc_restore process occur segfault when migration is > starting.(about one or two second.) So, I can't use gdb with > xc_restore's PID.This is the same as debugging any userspace program, the xen toolstack isn't special in this regard. Either you run the entire thing under gdb from the beginning or you configure things to dump core files and use that post-hoc along with the binary to examine the state. Ian. _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users