Could anyone who is using the gdbserver-xen from tools/debugger/gdb please try out the following patch: http://www.fsmware.com/xen/gdbserver-xen-6.8-upgrade.diff It should apply cleanly to xen-3.3-testing.hg. You will need to re-build and re-install libxenctl before building gdbserver-xen. This patch makes the following changes: - Make xc_ptrace and xc_waitdomain look and act sufficiently like ptrace and waitpid that code calling ptrace and waitpid does not need to be modified - Fix handling for case when attaching to a guest where not all APs are online - Detect which vcpu hit a breakpoint or was doing single-stepping so that gdb will switch to the vcpu that caused the trap Debugging SMP guests should actually work reliably now. Note that when using the remote protocol the GDB client won''t know about any new threads until ''info threads'' is requested. The changes to support xen using gdbserver are much less intrusive than previously. In principle, future updates should be quite easy. The code has only been changed to account for the fact that pid and lwpid are not the same for VMs whereas they are for user processes. The pid is analogous to the domid and lwpid is analogous to the vcpuid. Thanks, Kip _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kip Macy
2008-Oct-06 08:41 UTC
[Xen-devel] Re: RFT: gdbserver-xen update to 6.8 and SMP fixes
On Mon, Oct 6, 2008 at 5:45 AM, Kip Macy <kip.macy@gmail.com> wrote:> Could anyone who is using the gdbserver-xen from tools/debugger/gdb > please try out the following patch: > > http://www.fsmware.com/xen/gdbserver-xen-6.8-upgrade.diffThe logs indicate that a couple of people accessed the diff. If any of you intend to use it please grab it again. The original had a bug where a vcpuid would be passed when a domid was needed. I''ve updated the diff to incorporate the following addition: -+@@ -1194,7 +1323,12 @@ ++@@ -561,8 +690,13 @@ ++ int ret; ++ int to_wait_for = -1; ++ +++#ifdef XEN +++ if (*childp != NULL) +++ to_wait_for = (*childp)->head.id; +++#else ++ if (*childp != NULL) ++ to_wait_for = (*childp)->lwpid; +++#endif Cheers, Kip _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel