* Re: Debugging Xen via serial console [not found] <200901282246.n0SMkdAS009199@rgminet13.oracle.com> @ 2009-01-31 2:57 ` Mukesh Rathor 2009-02-19 19:39 ` Compile error in KDB branch when debug=y Emre Can Sezer 0 siblings, 1 reply; 6+ messages in thread From: Mukesh Rathor @ 2009-01-31 2:57 UTC (permalink / raw) To: xen-devel; +Cc: ecsezer Hi, kdb: to debug xen hypervisor, could also debug guests gdbsx: to debug PV/HVM linux guests The tree is : http://xenbits.xensource.com/ext/debuggers.hg See README-dbg. You'll need to setup serial access for kdb. Thanks, Mukesh > > Hi Dan, > > I'm currently using your version of ssplitd as it is. I haven't tried > kdb. For some reason I thought that was for debugging guest domains. > I'll look into it. As for resurrecting the gdbstub, I'm *NOT* familiar > enough > with it to try it myself. I do have a few people here who might be though. > I'll post something if we get it working. > > Thanks, > > John > > Dan Doucette wrote: >> Hi John, >> >> The patches I submitted quickly fell out of sync with the 3.2 unstable >> branch at the time. I found a month or so later they stopped working, >> and I didnt have the time to keep them up to date. >> For Xen debugging, have you tried the kdb branch maintained my Mukesh >> Rathor (Oracle)? I used this a few months ago and it seemed to work. >> The branch is off the mainline, however. Its usage is documented in >> the xen wiki pages, I believe. >> >> If you would prefer to use gdb, the functionality should be easy to >> resurrect. There really wasnt much to it. >> I would recommend using my serial port splitter (ssplitd.c), which I >> found easier to use and was complete in its implementation. I >> submitted all the changes in proper patch form after the posting you >> referenced above, if you are interested. >> >> Dan. >> >> >> >> >> On Wed, Jan 28, 2009 at 10:53 AM, Emre Can Sezer <ecsezer@ncsu.edu >> <mailto:ecsezer@ncsu.edu>> wrote: >> >> I'm trying to debug Xen remotely using serial port. I followed >> the instructions on the following post made in this xen-devel list: >> http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00678.html >> >> I was able to connect gdb but I ran into a problem where even >> after I clear all the breakpoints, execution traps into gdb with >> SIGTRAP at restore_all_xen(). This only happens if I set a >> breakpoint and then try to continue after hitting the break point. >> If I simply connect gdb but continue without setting any >> breakpoints, everything is OK. >> >> The post mentions some stability issues and I haven't seen any >> follow ups. Is this still a viable debugging method? Or is there >> some other method I should try? >> >> Thanks in advance, >> >> John >> >> >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com <mailto:Xen-devel@lists.xensource.com> >> http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Compile error in KDB branch when debug=y. 2009-01-31 2:57 ` Debugging Xen via serial console Mukesh Rathor @ 2009-02-19 19:39 ` Emre Can Sezer 2009-02-20 0:52 ` Mukesh Rathor 0 siblings, 1 reply; 6+ messages in thread From: Emre Can Sezer @ 2009-02-19 19:39 UTC (permalink / raw) To: mukesh.rathor; +Cc: xen-devel Hi Mukesh, Got a compile time type mismatch error from debug.c:70 when compiling with debug=y. Below is the single line patch to fix it. --- xen-unstable/xen/arch/x86/debug.c 2009-02-19 14:27:02.000000000 -0500 +++ xen-debug/xen/arch/x86/debug.c 2009-02-18 17:26:09.000000000 -0500 @@ -67,7 +67,7 @@ } #if XEN_SUBVERSION >= 2 /* xen >= 3.2.x */ - mfn = gfn_to_mfn(dp, gfn, &gfntype); + mfn = mfn_x(gfn_to_mfn(dp, gfn, &gfntype)); if (p2m_is_readonly(gfntype) && toaddr) { DBGP2("kdb:p2m_is_readonly: gfntype:%x\n", gfntype); return INVALID_MFN; Cheers, John Mukesh Rathor wrote: > > Hi, > > kdb: to debug xen hypervisor, could also debug guests > gdbsx: to debug PV/HVM linux guests > > The tree is : http://xenbits.xensource.com/ext/debuggers.hg > > See README-dbg. You'll need to setup serial access for kdb. > > Thanks, > Mukesh > > > > > Hi Dan, > > > > I'm currently using your version of ssplitd as it is. I haven't tried > > kdb. For some reason I thought that was for debugging guest domains. > > I'll look into it. As for resurrecting the gdbstub, I'm *NOT* familiar > > enough > > with it to try it myself. I do have a few people here who might be > though. > > I'll post something if we get it working. > > > > Thanks, > > > > John > > > > Dan Doucette wrote: > >> Hi John, > >> > >> The patches I submitted quickly fell out of sync with the 3.2 unstable > >> branch at the time. I found a month or so later they stopped working, > >> and I didnt have the time to keep them up to date. > >> For Xen debugging, have you tried the kdb branch maintained my Mukesh > >> Rathor (Oracle)? I used this a few months ago and it seemed to work. > >> The branch is off the mainline, however. Its usage is documented in > >> the xen wiki pages, I believe. > >> > >> If you would prefer to use gdb, the functionality should be easy to > >> resurrect. There really wasnt much to it. > >> I would recommend using my serial port splitter (ssplitd.c), which I > >> found easier to use and was complete in its implementation. I > >> submitted all the changes in proper patch form after the posting you > >> referenced above, if you are interested. > >> > >> Dan. > >> > >> > >> > >> > >> On Wed, Jan 28, 2009 at 10:53 AM, Emre Can Sezer <ecsezer@ncsu.edu > >> <mailto:ecsezer@ncsu.edu>> wrote: > >> > >> I'm trying to debug Xen remotely using serial port. I followed > >> the instructions on the following post made in this xen-devel > list: > >> > http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00678.html > >> > >> I was able to connect gdb but I ran into a problem where even > >> after I clear all the breakpoints, execution traps into gdb with > >> SIGTRAP at restore_all_xen(). This only happens if I set a > >> breakpoint and then try to continue after hitting the break point. > >> If I simply connect gdb but continue without setting any > >> breakpoints, everything is OK. > >> > >> The post mentions some stability issues and I haven't seen any > >> follow ups. Is this still a viable debugging method? Or is there > >> some other method I should try? > >> > >> Thanks in advance, > >> > >> John > >> > >> > >> > >> > >> _______________________________________________ > >> Xen-devel mailing list > >> Xen-devel@lists.xensource.com > <mailto:Xen-devel@lists.xensource.com> > >> http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Compile error in KDB branch when debug=y. 2009-02-19 19:39 ` Compile error in KDB branch when debug=y Emre Can Sezer @ 2009-02-20 0:52 ` Mukesh Rathor 0 siblings, 0 replies; 6+ messages in thread From: Mukesh Rathor @ 2009-02-20 0:52 UTC (permalink / raw) To: Emre Can Sezer; +Cc: xen-devel Hi John, Thanks for the patch. Actually, I noticed it last week when I refreshed the tree to latest and debug was turned on by default. There are problems running kdb with debug=y, like: (XEN) Xen BUG at spinlock.c:23 *** kdb (Fatal Error on cpu:1 vec:6 Invalid Opcode): ffff828c8011b865: check_lock+3d ud2 [1]xkdb> [1]xkdb> f (XEN) [<ffff828c8011b865>] check_lock+0x3d/0x4e (XEN) [<ffff828c8011b9eb>] _spin_lock+0x11/0x24 (XEN) [<ffff828c8015bd5c>] do_settime+0x26/0x87 (XEN) [<ffff828c8015c1f5>] kdb_time_resume+0x90/0x121 (XEN) [<ffff828c801d94d4>] kdb_end_session+0x8f/0x298 (XEN) [<ffff828c801d9e3b>] kdbmain+0x75e/0x867 (XEN) [<ffff828c801d9fa2>] kdb_keyboard+0x11/0x13 (XEN) [<ffff828c80128e99>] serial_rx+0x2f/0xd8 (XEN) [<ffff828c8012a2e7>] serial_rx_interrupt+0xa9/0xbf So I'd recommend turning it off, even tho I've fixed the build break. Since I always have debug=n (with frame_pointer=yes) when I debug, I've not looked at any of these issues. BTW, I've refreshed the tree to latest, so please check it out: http://xenbits.xensource.com/ext/debuggers.hg Thanks, Mukesh Emre Can Sezer wrote: > Hi Mukesh, > > Got a compile time type mismatch error from debug.c:70 when compiling > with debug=y. Below is the single line patch to fix it. > > --- xen-unstable/xen/arch/x86/debug.c 2009-02-19 14:27:02.000000000 > -0500 > +++ xen-debug/xen/arch/x86/debug.c 2009-02-18 17:26:09.000000000 -0500 > @@ -67,7 +67,7 @@ > } > > #if XEN_SUBVERSION >= 2 /* xen >= 3.2.x */ > - mfn = gfn_to_mfn(dp, gfn, &gfntype); > + mfn = mfn_x(gfn_to_mfn(dp, gfn, &gfntype)); > if (p2m_is_readonly(gfntype) && toaddr) { > DBGP2("kdb:p2m_is_readonly: gfntype:%x\n", gfntype); > return INVALID_MFN; > > > Cheers, > > John > > > > Mukesh Rathor wrote: >> >> Hi, >> >> kdb: to debug xen hypervisor, could also debug guests >> gdbsx: to debug PV/HVM linux guests >> >> The tree is : http://xenbits.xensource.com/ext/debuggers.hg >> >> See README-dbg. You'll need to setup serial access for kdb. >> >> Thanks, >> Mukesh >> >> > >> > Hi Dan, >> > >> > I'm currently using your version of ssplitd as it is. I haven't tried >> > kdb. For some reason I thought that was for debugging guest domains. >> > I'll look into it. As for resurrecting the gdbstub, I'm *NOT* familiar >> > enough >> > with it to try it myself. I do have a few people here who might be >> though. >> > I'll post something if we get it working. >> > >> > Thanks, >> > >> > John >> > >> > Dan Doucette wrote: >> >> Hi John, >> >> >> >> The patches I submitted quickly fell out of sync with the 3.2 unstable >> >> branch at the time. I found a month or so later they stopped working, >> >> and I didnt have the time to keep them up to date. >> >> For Xen debugging, have you tried the kdb branch maintained my Mukesh >> >> Rathor (Oracle)? I used this a few months ago and it seemed to work. >> >> The branch is off the mainline, however. Its usage is documented in >> >> the xen wiki pages, I believe. >> >> >> >> If you would prefer to use gdb, the functionality should be easy to >> >> resurrect. There really wasnt much to it. >> >> I would recommend using my serial port splitter (ssplitd.c), which I >> >> found easier to use and was complete in its implementation. I >> >> submitted all the changes in proper patch form after the posting you >> >> referenced above, if you are interested. >> >> >> >> Dan. >> >> >> >> >> >> >> >> >> >> On Wed, Jan 28, 2009 at 10:53 AM, Emre Can Sezer <ecsezer@ncsu.edu >> >> <mailto:ecsezer@ncsu.edu>> wrote: >> >> >> >> I'm trying to debug Xen remotely using serial port. I followed >> >> the instructions on the following post made in this xen-devel >> list: >> >> >> http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00678.html >> >> >> >> I was able to connect gdb but I ran into a problem where even >> >> after I clear all the breakpoints, execution traps into gdb with >> >> SIGTRAP at restore_all_xen(). This only happens if I set a >> >> breakpoint and then try to continue after hitting the break point. >> >> If I simply connect gdb but continue without setting any >> >> breakpoints, everything is OK. >> >> >> >> The post mentions some stability issues and I haven't seen any >> >> follow ups. Is this still a viable debugging method? Or is there >> >> some other method I should try? >> >> >> >> Thanks in advance, >> >> >> >> John >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> >> Xen-devel mailing list >> >> Xen-devel@lists.xensource.com >> <mailto:Xen-devel@lists.xensource.com> >> >> http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* How do you debug Xen? @ 2009-01-09 15:46 Emre Can Sezer 2009-01-28 18:53 ` Debugging Xen via serial console Emre Can Sezer 0 siblings, 1 reply; 6+ messages in thread From: Emre Can Sezer @ 2009-01-09 15:46 UTC (permalink / raw) To: Xen Devel Hi, I want to use a debugger to debug some code I wrote in the hypervisor. What is the best way to go about this? I would appreciate any links or info. The only thing I found was enabling gdbstub and using gdb remotely via serial cable. Is there an example on how to set this up? The examples in kgdb website refer to linux, so I'm hoping to get something more specific. I tried to look through the mailing list archives but couldn't find anything but the patches. And if I'm trying to debug a 64-bit Xen, can I do this from a 32-bit remote machine? Thanks, John ^ permalink raw reply [flat|nested] 6+ messages in thread
* Debugging Xen via serial console 2009-01-09 15:46 How do you debug Xen? Emre Can Sezer @ 2009-01-28 18:53 ` Emre Can Sezer 2009-01-28 19:25 ` Dan Doucette 0 siblings, 1 reply; 6+ messages in thread From: Emre Can Sezer @ 2009-01-28 18:53 UTC (permalink / raw) To: Xen Devel I'm trying to debug Xen remotely using serial port. I followed the instructions on the following post made in this xen-devel list: http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00678.html I was able to connect gdb but I ran into a problem where even after I clear all the breakpoints, execution traps into gdb with SIGTRAP at restore_all_xen(). This only happens if I set a breakpoint and then try to continue after hitting the break point. If I simply connect gdb but continue without setting any breakpoints, everything is OK. The post mentions some stability issues and I haven't seen any follow ups. Is this still a viable debugging method? Or is there some other method I should try? Thanks in advance, John ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Debugging Xen via serial console 2009-01-28 18:53 ` Debugging Xen via serial console Emre Can Sezer @ 2009-01-28 19:25 ` Dan Doucette 2009-01-28 20:09 ` Emre Can Sezer 0 siblings, 1 reply; 6+ messages in thread From: Dan Doucette @ 2009-01-28 19:25 UTC (permalink / raw) To: Emre Can Sezer; +Cc: Xen Devel [-- Attachment #1.1: Type: text/plain, Size: 1808 bytes --] Hi John, The patches I submitted quickly fell out of sync with the 3.2 unstable branch at the time. I found a month or so later they stopped working, and I didnt have the time to keep them up to date. For Xen debugging, have you tried the kdb branch maintained my Mukesh Rathor (Oracle)? I used this a few months ago and it seemed to work. The branch is off the mainline, however. Its usage is documented in the xen wiki pages, I believe. If you would prefer to use gdb, the functionality should be easy to resurrect. There really wasnt much to it. I would recommend using my serial port splitter (ssplitd.c), which I found easier to use and was complete in its implementation. I submitted all the changes in proper patch form after the posting you referenced above, if you are interested. Dan. On Wed, Jan 28, 2009 at 10:53 AM, Emre Can Sezer <ecsezer@ncsu.edu> wrote: > I'm trying to debug Xen remotely using serial port. I followed the > instructions on the following post made in this xen-devel list: > http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00678.html > > I was able to connect gdb but I ran into a problem where even after I clear > all the breakpoints, execution traps into gdb with SIGTRAP at > restore_all_xen(). This only happens if I set a breakpoint and then try to > continue after hitting the break point. If I simply connect gdb but > continue without setting any breakpoints, everything is OK. > > The post mentions some stability issues and I haven't seen any follow ups. > Is this still a viable debugging method? Or is there some other method I > should try? > > Thanks in advance, > > John > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > [-- Attachment #1.2: Type: text/html, Size: 2538 bytes --] [-- Attachment #2: Type: text/plain, Size: 138 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Debugging Xen via serial console 2009-01-28 19:25 ` Dan Doucette @ 2009-01-28 20:09 ` Emre Can Sezer 0 siblings, 0 replies; 6+ messages in thread From: Emre Can Sezer @ 2009-01-28 20:09 UTC (permalink / raw) To: Xen Devel Hi Dan, I'm currently using your version of ssplitd as it is. I haven't tried kdb. For some reason I thought that was for debugging guest domains. I'll look into it. As for resurrecting the gdbstub, I'm *NOT* familiar enough with it to try it myself. I do have a few people here who might be though. I'll post something if we get it working. Thanks, John Dan Doucette wrote: > Hi John, > > The patches I submitted quickly fell out of sync with the 3.2 unstable > branch at the time. I found a month or so later they stopped working, > and I didnt have the time to keep them up to date. > For Xen debugging, have you tried the kdb branch maintained my Mukesh > Rathor (Oracle)? I used this a few months ago and it seemed to work. > The branch is off the mainline, however. Its usage is documented in > the xen wiki pages, I believe. > > If you would prefer to use gdb, the functionality should be easy to > resurrect. There really wasnt much to it. > I would recommend using my serial port splitter (ssplitd.c), which I > found easier to use and was complete in its implementation. I > submitted all the changes in proper patch form after the posting you > referenced above, if you are interested. > > Dan. > > > > > On Wed, Jan 28, 2009 at 10:53 AM, Emre Can Sezer <ecsezer@ncsu.edu > <mailto:ecsezer@ncsu.edu>> wrote: > > I'm trying to debug Xen remotely using serial port. I followed > the instructions on the following post made in this xen-devel list: > http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00678.html > > I was able to connect gdb but I ran into a problem where even > after I clear all the breakpoints, execution traps into gdb with > SIGTRAP at restore_all_xen(). This only happens if I set a > breakpoint and then try to continue after hitting the break point. > If I simply connect gdb but continue without setting any > breakpoints, everything is OK. > > The post mentions some stability issues and I haven't seen any > follow ups. Is this still a viable debugging method? Or is there > some other method I should try? > > Thanks in advance, > > John > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com <mailto:Xen-devel@lists.xensource.com> > http://lists.xensource.com/xen-devel > > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-20 0:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200901282246.n0SMkdAS009199@rgminet13.oracle.com>
2009-01-31 2:57 ` Debugging Xen via serial console Mukesh Rathor
2009-02-19 19:39 ` Compile error in KDB branch when debug=y Emre Can Sezer
2009-02-20 0:52 ` Mukesh Rathor
2009-01-09 15:46 How do you debug Xen? Emre Can Sezer
2009-01-28 18:53 ` Debugging Xen via serial console Emre Can Sezer
2009-01-28 19:25 ` Dan Doucette
2009-01-28 20:09 ` Emre Can Sezer
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.