I run a centos6.2 guest VM in xen4.1.2, the id of centos-domU is 22. The info of dom0 is: 2.6.32-131.21.1.el6.xendom0.x86_64 #1 SMP Tue Dec 13 18:09:29 EST 2011 x86_64 x86_64 x86_64 GNU/Linux Centos-domU: 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:02 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux At dom0, I went like this: [malei@xentest-4-1 Tue Apr 30 ~]$ sudo gdbsx -a 22 64 9999 Listening on port 9999 Remote debugging from host 172.16.1.122 (After that, I found the vm became paused, but next, I should run gdb on centos-domU, so I set the vm to be unpaused by xl unpause 22) Then, at centos-domU, I went like this: (gdb) set verbose on (gdb) set print pretty (gdb) file /usr/lib/debug/lib/modules/2.6.32-220.el6.x86_64/vmlinux Reading symbols from /usr/lib/debug/lib/modules/2.6.32-220.el6.x86_64/vmlinux...done. (gdb) directory rpmbuild/BUILD/kernel-2.6.32-220.el6/linux-2.6.32-220.el6.x86_64/ Source directories searched: /home/malei/rpmbuild/BUILD/kernel-2.6.32-220.el6/linux-2.6.32-220.el6.x86_64:$cdir:$cwd (gdb) directory /usr/src/debug/kernel-2.6.32-220.el6/linux-2.6.32-220.el6.x86_64/ Source directories searched: /usr/src/debug/kernel-2.6.32-220.el6/linux-2.6.32-220.el6.x86_64:/home/malei/rpmbuild/BUILD/kernel-2.6.32-220.el6/linux-2.6.32-220.el6.x86_64:$cdir:$cwd (gdb) target remote 10.18.135.250:9999 Remote debugging using 10.18.135.250:9999 [Switching to Remote target] 0xffffffffa013c5e6 in ?? () (gdb) b start_kernel Breakpoint 1 at 0xffffffff81c1fb52: file init/main.c, line 564. (gdb) c Continuing. Remote connection closed At that time, messages echoed at dom0: [malei@xentest-4-1 Tue Apr 30 ~]$ sudo gdbsx -a 22 64 9999 Listening on port 9999 Remote debugging from host 172.16.1.122 gdbsx: xg_main.c:497: xg_resume_n_wait: Assertion `_domain_is_paused()'' failed. Why would the Assertion failure happen? Preciate for your reply, thanks in advance. Best regards. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Mukesh Rathor
2013-Apr-30 19:06 UTC
Re: 【Problem】 about using gdbsx to debug guest linux VM
On Tue, 30 Apr 2013 14:00:53 +0800 马磊 <aware.why@gmail.com> wrote:> I run a centos6.2 guest VM in xen4.1.2, the id of centos-domU is 22. > > The info of dom0 is: > 2.6.32-131.21.1.el6.xendom0.x86_64 #1 SMP Tue Dec 13 18:09:29 EST 2011 > x86_64 x86_64 x86_64 GNU/Linux > > Centos-domU: > 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:02 GMT 2012 x86_64 > x86_64 x86_64 GNU/Linux > > > At dom0, I went like this: > [malei@xentest-4-1 Tue Apr 30 ~]$ sudo gdbsx -a 22 64 9999 > Listening on port 9999 > Remote debugging from host 172.16.1.122 > > (After that, I found the vm became paused, but next, I should run gdb > on centos-domU, > so I set the vm to be unpaused by xl unpause 22)Don't unpause the guest. Follow instructions in README in tools/debugger/gdbsx. thanks Mukesh _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Thanks all the same. I found the resolution that run gdb at the host not the VM and target remote to 127.0.0.1. But I have no idea why the VM kernel''s debuginfo should be copied to the host, otherwise, the function symbols were displayed as `??` when using bt command in gdb. On Wed, May 1, 2013 at 3:06 AM, Mukesh Rathor <mukesh.rathor@oracle.com>wrote:> On Tue, 30 Apr 2013 14:00:53 +0800 > 马磊 <aware.why@gmail.com> wrote: > > > I run a centos6.2 guest VM in xen4.1.2, the id of centos-domU is 22. > > > > The info of dom0 is: > > 2.6.32-131.21.1.el6.xendom0.x86_64 #1 SMP Tue Dec 13 18:09:29 EST 2011 > > x86_64 x86_64 x86_64 GNU/Linux > > > > Centos-domU: > > 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:02 GMT 2012 x86_64 > > x86_64 x86_64 GNU/Linux > > > > > > At dom0, I went like this: > > [malei@xentest-4-1 Tue Apr 30 ~]$ sudo gdbsx -a 22 64 9999 > > Listening on port 9999 > > Remote debugging from host 172.16.1.122 > > > > (After that, I found the vm became paused, but next, I should run gdb > > on centos-domU, > > so I set the vm to be unpaused by xl unpause 22) > > Don''t unpause the guest. Follow instructions in README in > tools/debugger/gdbsx. > > thanks > Mukesh >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Maybe Matching Threads
- gdbsx defines own _domctl_hcall instead of using libxc?
- [Problem with xen-4.1.2] Creating device model failed when disable `-vnc` related option in qemu-dm
- 【help】why not support showing filename containing chinese characters with the ls function?
- Re: gdbsx bug : fail on a breakpoint
- Re: Debugging Xen via serial console