* VMWare Workstation 6 for debugging Linux Kernel (!)
@ 2007-04-19 22:46 roland
2007-04-20 7:16 ` albcamus
2007-04-20 8:42 ` Xavier Bestel
0 siblings, 2 replies; 12+ messages in thread
From: roland @ 2007-04-19 22:46 UTC (permalink / raw)
To: linux-kernel
Hi !
I think this one is damn interestig for linux kernel development:
link: http://stackframe.blogspot.com/
contents: see below
regards
roland
ps:
i`m not directly related to vmware - so this is no advertisement!
Tuesday, April 17, 2007
Debugging Linux kernels with Workstation 6.0
We just quietly added an exciting feature to Workstation 6.0. I believe it
will make WS6 a great tool for Linux kernel development. You can now debug
kernel of Linux VM with gdb running on the Host without changing anything in
the Guest VM. No kdb, no recompiling and no need for second machine. All you
need is a single line in VM's configuration file.
To use the new feature, grab the latest build of WS6 here:
http://www.vmware.com/products/beta/ws/
Put this line into configuration file of your Linux VM:
debugStub.listen.guest32=1
Now whenever you run the virtual machine, you'll see the following on the
Host console:
VMware Workstation is listening for debug connection on port 8832.
Run gdb on the Host, reference it to the kernel with symbols and attach to
the virtual machine:
% gdb
(gdb) file vmlinux-2.4.21-27.EL.debug
(gdb) target remote localhost:8832
That's it. The VM is blocked now, so you can "continue" it and "^C" back to
gdb. Breakpoints, single step, memory inspection - all this works as usual.
If you have SMP VM, then each VCPU is mapped on a thread, so use "info
threads" and "thread NN" to switch between them.
The kernels with symbols are sadly lacking on most distributions, but if you
use RHEL then this website may help (look for kernel-debuginfo rpm):
http://people.redhat.com/duffy/debuginfo/index-js.html
The gdb support in WS6 is experimental, so there may be rough edges here and
there. Please post on community forums if something doesn't work right or if
you have a suggestion:
http://www.vmware.com/community/
There are more debugging specific features in WS6 (for example, you can use
gdb hand-in-hand with Record/Replay!). I will describe them shortly.
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-19 22:46 VMWare Workstation 6 for debugging Linux Kernel (!) roland
@ 2007-04-20 7:16 ` albcamus
2007-04-20 8:42 ` Xavier Bestel
1 sibling, 0 replies; 12+ messages in thread
From: albcamus @ 2007-04-20 7:16 UTC (permalink / raw)
To: roland; +Cc: linux-kernel
Hi roland,
It's really an interesting feature, IMHO, maybe the UML would be no
more needed.
thanks very much;-)
Regards,
2007/4/20, roland <devzero@web.de>:
> Hi !
>
> I think this one is damn interestig for linux kernel development:
>
> link: http://stackframe.blogspot.com/
> contents: see below
>
> regards
> roland
>
> ps:
> i`m not directly related to vmware - so this is no advertisement!
>
>
> Tuesday, April 17, 2007
> Debugging Linux kernels with Workstation 6.0
> We just quietly added an exciting feature to Workstation 6.0. I believe it
> will make WS6 a great tool for Linux kernel development. You can now debug
> kernel of Linux VM with gdb running on the Host without changing anything in
> the Guest VM. No kdb, no recompiling and no need for second machine. All you
> need is a single line in VM's configuration file.
>
> To use the new feature, grab the latest build of WS6 here:
>
> http://www.vmware.com/products/beta/ws/
>
> Put this line into configuration file of your Linux VM:
>
> debugStub.listen.guest32=1
>
> Now whenever you run the virtual machine, you'll see the following on the
> Host console:
>
> VMware Workstation is listening for debug connection on port 8832.
>
> Run gdb on the Host, reference it to the kernel with symbols and attach to
> the virtual machine:
>
> % gdb
> (gdb) file vmlinux-2.4.21-27.EL.debug
> (gdb) target remote localhost:8832
>
> That's it. The VM is blocked now, so you can "continue" it and "^C" back to
> gdb. Breakpoints, single step, memory inspection - all this works as usual.
> If you have SMP VM, then each VCPU is mapped on a thread, so use "info
> threads" and "thread NN" to switch between them.
>
> The kernels with symbols are sadly lacking on most distributions, but if you
> use RHEL then this website may help (look for kernel-debuginfo rpm):
>
> http://people.redhat.com/duffy/debuginfo/index-js.html
>
> The gdb support in WS6 is experimental, so there may be rough edges here and
> there. Please post on community forums if something doesn't work right or if
> you have a suggestion:
>
> http://www.vmware.com/community/
>
> There are more debugging specific features in WS6 (for example, you can use
> gdb hand-in-hand with Record/Replay!). I will describe them shortly.
>
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-19 22:46 VMWare Workstation 6 for debugging Linux Kernel (!) roland
2007-04-20 7:16 ` albcamus
@ 2007-04-20 8:42 ` Xavier Bestel
2007-04-20 10:27 ` Andi Kleen
1 sibling, 1 reply; 12+ messages in thread
From: Xavier Bestel @ 2007-04-20 8:42 UTC (permalink / raw)
To: roland; +Cc: linux-kernel
On Fri, 2007-04-20 at 00:46 +0200, roland wrote:
> We just quietly added an exciting feature to Workstation 6.0. I believe it
> will make WS6 a great tool for Linux kernel development. You can now debug
> kernel of Linux VM with gdb running on the Host without changing anything in
> the Guest VM. No kdb, no recompiling and no need for second machine. All you
> need is a single line in VM's configuration file.
I think qemu has the exact same feature.
Xav
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-20 8:42 ` Xavier Bestel
@ 2007-04-20 10:27 ` Andi Kleen
2007-04-20 11:21 ` Petr Vandrovec
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Andi Kleen @ 2007-04-20 10:27 UTC (permalink / raw)
To: Xavier Bestel; +Cc: roland, linux-kernel
Xavier Bestel <xavier.bestel@free.fr> writes:
> On Fri, 2007-04-20 at 00:46 +0200, roland wrote:
>
> > We just quietly added an exciting feature to Workstation 6.0. I believe it
> > will make WS6 a great tool for Linux kernel development. You can now debug
> > kernel of Linux VM with gdb running on the Host without changing anything in
> > the Guest VM. No kdb, no recompiling and no need for second machine. All you
> > need is a single line in VM's configuration file.
>
> I think qemu has the exact same feature.
It doesn't seem to work for x86-64 there though.
AMD SimNow! and Virtutech Simics can do it too. But great the Vmware catches up.
-Andi
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: VMWare Workstation 6 for debugging Linux Kernel (!)
@ 2007-04-20 10:58 devzero
0 siblings, 0 replies; 12+ messages in thread
From: devzero @ 2007-04-20 10:58 UTC (permalink / raw)
To: albcamus; +Cc: jdike, linux-kernel
> It's really an interesting feature, IMHO, maybe the UML would be no
> more needed.
if you speak of debugging , uml seems to have another competitor now.
maybe somebody make some side by side comparison of vmware & uml regarding kernel debugging. (and also compare that to traditional debugging via serial line or network)
regards
roland
> -----Ursprüngliche Nachricht-----
> Von: albcamus <albcamus@gmail.com>
> Gesendet: 20.04.07 09:16:53
> An: roland <devzero@web.de>
> CC: linux-kernel@vger.kernel.org
> Betreff: RE: VMWare Workstation 6 for debugging Linux Kernel (!)
>
> Hi roland,
> It's really an interesting feature, IMHO, maybe the UML would be no
> more needed.
> thanks very much;-)
>
> Regards,
>
>
> 2007/4/20, roland <devzero@web.de>:
> > Hi !
> >
> > I think this one is damn interestig for linux kernel development:
> >
> > link: http://stackframe.blogspot.com/
> > contents: see below
> >
> > regards
> > roland
> >
> > ps:
> > i`m not directly related to vmware - so this is no advertisement!
> >
> >
> > Tuesday, April 17, 2007
> > Debugging Linux kernels with Workstation 6.0
> > We just quietly added an exciting feature to Workstation 6.0. I believe it
> > will make WS6 a great tool for Linux kernel development. You can now debug
> > kernel of Linux VM with gdb running on the Host without changing anything in
> > the Guest VM. No kdb, no recompiling and no need for second machine. All you
> > need is a single line in VM's configuration file.
> >
> > To use the new feature, grab the latest build of WS6 here:
> >
> > http://www.vmware.com/products/beta/ws/
> >
> > Put this line into configuration file of your Linux VM:
> >
> > debugStub.listen.guest32=1
> >
> > Now whenever you run the virtual machine, you'll see the following on the
> > Host console:
> >
> > VMware Workstation is listening for debug connection on port 8832.
> >
> > Run gdb on the Host, reference it to the kernel with symbols and attach to
> > the virtual machine:
> >
> > % gdb
> > (gdb) file vmlinux-2.4.21-27.EL.debug
> > (gdb) target remote localhost:8832
> >
> > That's it. The VM is blocked now, so you can "continue" it and "^C" back to
> > gdb. Breakpoints, single step, memory inspection - all this works as usual.
> > If you have SMP VM, then each VCPU is mapped on a thread, so use "info
> > threads" and "thread NN" to switch between them.
> >
> > The kernels with symbols are sadly lacking on most distributions, but if you
> > use RHEL then this website may help (look for kernel-debuginfo rpm):
> >
> > http://people.redhat.com/duffy/debuginfo/index-js.html
> >
> > The gdb support in WS6 is experimental, so there may be rough edges here and
> > there. Please post on community forums if something doesn't work right or if
> > you have a suggestion:
> >
> > http://www.vmware.com/community/
> >
> > There are more debugging specific features in WS6 (for example, you can use
> > gdb hand-in-hand with Record/Replay!). I will describe them shortly.
> >
> >
> >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
>
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-20 10:27 ` Andi Kleen
@ 2007-04-20 11:21 ` Petr Vandrovec
2007-04-20 11:44 ` Nigel Cunningham
2007-04-20 12:38 ` Andi Kleen
2007-04-20 11:21 ` Nigel Cunningham
2007-04-20 11:45 ` Avi Kivity
2 siblings, 2 replies; 12+ messages in thread
From: Petr Vandrovec @ 2007-04-20 11:21 UTC (permalink / raw)
To: Andi Kleen; +Cc: Xavier Bestel, roland, linux-kernel
Andi Kleen wrote:
> Xavier Bestel <xavier.bestel@free.fr> writes:
>
>> On Fri, 2007-04-20 at 00:46 +0200, roland wrote:
>>
>>> We just quietly added an exciting feature to Workstation 6.0. I believe it
>>> will make WS6 a great tool for Linux kernel development. You can now debug
>>> kernel of Linux VM with gdb running on the Host without changing anything in
>>> the Guest VM. No kdb, no recompiling and no need for second machine. All you
>>> need is a single line in VM's configuration file.
>> I think qemu has the exact same feature.
>
> It doesn't seem to work for x86-64 there though.
Hello,
Do you mean with qemu or with VMware? Yes, we do not support replay
with 64bit guests, but debug interface should just work. Only gotcha is
that for 64bit guest you need another option:
debugStub.listen.guest64 = "TRUE"
and then you need to attach gdb to port 8864 (*). Unfortunately it does
not seem possible to build gdb which would support 16bit/32bit code
while using 64bit gdb on-wire format, so there are two interfaces. And
if you single-step switch from 64bit mode to 32bit mode or back, you
also have to switch gdbs. Yes, it is a bit unintuitive, and
additionally one gdb silently ignores breakpoints set up by other gdb,
so you need to keep breakpoints in sync between two gdbs yourself :-(
(*) If you are using gdb which has both 32bit and 64bit support, be sure
to issue appropriate 'set architecture xxx' before 'target remote
localhost:88xx' (i386:x86-64 for port 8864, i386 or i8086 for port
8832). Otherwise gdb is going to die complaining it could not parse
remote reply.
Best regards,
Petr Vandrovec
P.S.: Yes, I'm associated with VMware.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-20 10:27 ` Andi Kleen
2007-04-20 11:21 ` Petr Vandrovec
@ 2007-04-20 11:21 ` Nigel Cunningham
2007-04-20 11:45 ` Avi Kivity
2 siblings, 0 replies; 12+ messages in thread
From: Nigel Cunningham @ 2007-04-20 11:21 UTC (permalink / raw)
To: Andi Kleen; +Cc: Xavier Bestel, roland, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
Hi.
On Fri, 2007-04-20 at 12:27 +0200, Andi Kleen wrote:
> Xavier Bestel <xavier.bestel@free.fr> writes:
>
> > On Fri, 2007-04-20 at 00:46 +0200, roland wrote:
> >
> > > We just quietly added an exciting feature to Workstation 6.0. I believe it
> > > will make WS6 a great tool for Linux kernel development. You can now debug
> > > kernel of Linux VM with gdb running on the Host without changing anything in
> > > the Guest VM. No kdb, no recompiling and no need for second machine. All you
> > > need is a single line in VM's configuration file.
> >
> > I think qemu has the exact same feature.
>
> It doesn't seem to work for x86-64 there though.
You mean the VMware one doesn't work? I tried it and got:
(gdb) target remote localhost:8832
Remote debugging using localhost:8832
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" respoonse
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Malformed response to offset query, timeout
(gdb)
Hopefully that's not too hard to fix. Made the appropriate noises :)
Nigel
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-20 11:21 ` Petr Vandrovec
@ 2007-04-20 11:44 ` Nigel Cunningham
2007-04-20 12:38 ` Andi Kleen
1 sibling, 0 replies; 12+ messages in thread
From: Nigel Cunningham @ 2007-04-20 11:44 UTC (permalink / raw)
To: Petr Vandrovec; +Cc: Andi Kleen, Xavier Bestel, roland, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1846 bytes --]
Hi.
On Fri, 2007-04-20 at 04:21 -0700, Petr Vandrovec wrote:
> Andi Kleen wrote:
> > Xavier Bestel <xavier.bestel@free.fr> writes:
> >
> >> On Fri, 2007-04-20 at 00:46 +0200, roland wrote:
> >>
> >>> We just quietly added an exciting feature to Workstation 6.0. I believe it
> >>> will make WS6 a great tool for Linux kernel development. You can now debug
> >>> kernel of Linux VM with gdb running on the Host without changing anything in
> >>> the Guest VM. No kdb, no recompiling and no need for second machine. All you
> >>> need is a single line in VM's configuration file.
> >> I think qemu has the exact same feature.
> >
> > It doesn't seem to work for x86-64 there though.
>
> Hello,
>
> Do you mean with qemu or with VMware? Yes, we do not support replay
> with 64bit guests, but debug interface should just work. Only gotcha is
> that for 64bit guest you need another option:
>
> debugStub.listen.guest64 = "TRUE"
Ah. That might help :)
> and then you need to attach gdb to port 8864 (*). Unfortunately it does
> not seem possible to build gdb which would support 16bit/32bit code
> while using 64bit gdb on-wire format, so there are two interfaces. And
> if you single-step switch from 64bit mode to 32bit mode or back, you
> also have to switch gdbs. Yes, it is a bit unintuitive, and
> additionally one gdb silently ignores breakpoints set up by other gdb,
> so you need to keep breakpoints in sync between two gdbs yourself :-(
>
> (*) If you are using gdb which has both 32bit and 64bit support, be sure
> to issue appropriate 'set architecture xxx' before 'target remote
> localhost:88xx' (i386:x86-64 for port 8864, i386 or i8086 for port
> 8832). Otherwise gdb is going to die complaining it could not parse
> remote reply.
That too.
Thanks!
Nigel
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-20 10:27 ` Andi Kleen
2007-04-20 11:21 ` Petr Vandrovec
2007-04-20 11:21 ` Nigel Cunningham
@ 2007-04-20 11:45 ` Avi Kivity
2007-04-20 11:50 ` Nigel Cunningham
2 siblings, 1 reply; 12+ messages in thread
From: Avi Kivity @ 2007-04-20 11:45 UTC (permalink / raw)
To: Andi Kleen; +Cc: Xavier Bestel, roland, linux-kernel
Andi Kleen wrote:
> Xavier Bestel <xavier.bestel@free.fr> writes:
>
>
>> On Fri, 2007-04-20 at 00:46 +0200, roland wrote:
>>
>>
>>> We just quietly added an exciting feature to Workstation 6.0. I believe it
>>> will make WS6 a great tool for Linux kernel development. You can now debug
>>> kernel of Linux VM with gdb running on the Host without changing anything in
>>> the Guest VM. No kdb, no recompiling and no need for second machine. All you
>>> need is a single line in VM's configuration file.
>>>
>> I think qemu has the exact same feature.
>>
>
> It doesn't seem to work for x86-64 there though.
>
kvm's qemu has a patch that allows qemu to be an x86_64 gdbserver (with
or without kvm).
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-20 11:45 ` Avi Kivity
@ 2007-04-20 11:50 ` Nigel Cunningham
2007-04-20 11:52 ` Avi Kivity
0 siblings, 1 reply; 12+ messages in thread
From: Nigel Cunningham @ 2007-04-20 11:50 UTC (permalink / raw)
To: Avi Kivity; +Cc: Andi Kleen, Xavier Bestel, roland, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]
Hi.
On Fri, 2007-04-20 at 14:45 +0300, Avi Kivity wrote:
> Andi Kleen wrote:
> > Xavier Bestel <xavier.bestel@free.fr> writes:
> >
> >
> >> On Fri, 2007-04-20 at 00:46 +0200, roland wrote:
> >>
> >>
> >>> We just quietly added an exciting feature to Workstation 6.0. I believe it
> >>> will make WS6 a great tool for Linux kernel development. You can now debug
> >>> kernel of Linux VM with gdb running on the Host without changing anything in
> >>> the Guest VM. No kdb, no recompiling and no need for second machine. All you
> >>> need is a single line in VM's configuration file.
> >>>
> >> I think qemu has the exact same feature.
> >>
> >
> > It doesn't seem to work for x86-64 there though.
> >
>
> kvm's qemu has a patch that allows qemu to be an x86_64 gdbserver (with
> or without kvm).
I was meaning that vmware wasn't working, but it is now - I was trying a
64 host and client, and needed to know both the different line in the
config file and the different port number.
Regards,
Nigel
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-20 11:50 ` Nigel Cunningham
@ 2007-04-20 11:52 ` Avi Kivity
0 siblings, 0 replies; 12+ messages in thread
From: Avi Kivity @ 2007-04-20 11:52 UTC (permalink / raw)
To: nigel; +Cc: Avi Kivity, Andi Kleen, Xavier Bestel, roland, linux-kernel
Nigel Cunningham wrote:
> Hi.
>
> On Fri, 2007-04-20 at 14:45 +0300, Avi Kivity wrote:
>
>> Andi Kleen wrote:
>>
>>> Xavier Bestel <xavier.bestel@free.fr> writes:
>>>
>>>
>>>
>>>> On Fri, 2007-04-20 at 00:46 +0200, roland wrote:
>>>>
>>>>
>>>>
>>>>> We just quietly added an exciting feature to Workstation 6.0. I believe it
>>>>> will make WS6 a great tool for Linux kernel development. You can now debug
>>>>> kernel of Linux VM with gdb running on the Host without changing anything in
>>>>> the Guest VM. No kdb, no recompiling and no need for second machine. All you
>>>>> need is a single line in VM's configuration file.
>>>>>
>>>>>
>>>> I think qemu has the exact same feature.
>>>>
>>>>
>>> It doesn't seem to work for x86-64 there though.
>>>
>>>
>> kvm's qemu has a patch that allows qemu to be an x86_64 gdbserver (with
>> or without kvm).
>>
>
> I was meaning that vmware wasn't working, but it is now - I was trying a
> 64 host and client, and needed to know both the different line in the
> config file and the different port number.
>
Andi was talking about qemu, not VMware, I believe.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: VMWare Workstation 6 for debugging Linux Kernel (!)
2007-04-20 11:21 ` Petr Vandrovec
2007-04-20 11:44 ` Nigel Cunningham
@ 2007-04-20 12:38 ` Andi Kleen
1 sibling, 0 replies; 12+ messages in thread
From: Andi Kleen @ 2007-04-20 12:38 UTC (permalink / raw)
To: Petr Vandrovec; +Cc: Andi Kleen, Xavier Bestel, roland, linux-kernel
> Do you mean with qemu
qemu.
-Andi
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-04-20 12:38 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-19 22:46 VMWare Workstation 6 for debugging Linux Kernel (!) roland
2007-04-20 7:16 ` albcamus
2007-04-20 8:42 ` Xavier Bestel
2007-04-20 10:27 ` Andi Kleen
2007-04-20 11:21 ` Petr Vandrovec
2007-04-20 11:44 ` Nigel Cunningham
2007-04-20 12:38 ` Andi Kleen
2007-04-20 11:21 ` Nigel Cunningham
2007-04-20 11:45 ` Avi Kivity
2007-04-20 11:50 ` Nigel Cunningham
2007-04-20 11:52 ` Avi Kivity
-- strict thread matches above, loose matches on Subject: below --
2007-04-20 10:58 devzero
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.