tag:blogger.com,1999:blog-3629493929841862986.post6811846416632352439..comments2009-02-27T17:30:16.106-08:00Comments on Debugging the virtual world.: Debugging Linux kernels with Workstation 6.0Slavahttp://www.blogger.com/profile/11817787238843961916noreply@blogger.comBlogger29125tag:blogger.com,1999:blog-3629493929841862986.post-13036533827580884212009-02-27T17:30:00.000-08:002009-02-27T17:30:00.000-08:00Hi Ben, thanks for your question and sorry for lat...Hi Ben, thanks for your question and sorry for late reply. The Record/Replay debugging is perfect for your scenario. The way to use it is to enable recording mode in VM, say, while it is still in the BIOS and keep it recording why your PXE bootloader is working. Once it manifests a bug, you stop recording, and debug the recording like you'd debug a kernel issue. One caveat is that if you use 16-bits mode you'll have to adjust linear addresses in gdb.<BR/><BR/>That was a summary. If you have additional questions, please post in our Forum:<BR/><BR/>http://communities.vmware.com/community/vmtn/general/guestdebugmonitor<BR/><BR/>Thanks a lot.Slavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-64495778048114650242009-02-27T17:27:00.000-08:002009-02-27T17:27:00.000-08:00Hi Mrunal, and sorry for the late replay. You have...Hi Mrunal, and sorry for the late replay. You have asked several questions and I'd need more information about your environment to diagnose the issue. If it is still a problem, could you please repost in the Forums? Thanks a lot. the URL of the Forum is:<BR/><BR/>http://communities.vmware.com/community/vmtn/general/guestdebugmonitorSlavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-3069894196929178012009-02-27T17:24:00.000-08:002009-02-27T17:24:00.000-08:00Hi JS. I have a feeling I was asked the question a...Hi JS. I have a feeling I was asked the question about OSX in Forums already. The short answer is that Darwin gdb does not seem to like format of vmlinux. So the easiest solution is to run two Linux VMs - one target and one with gdb, and attach gdb form second VM to the first VM. This will be considered a remote gdb connection by first VM, so you'll have to add this line to the config file of the first VM assuming VM is 32-bit):<BR/><BR/>debugStub.listen.guest32.remote = "TRUE"Slavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-76860710683227979602009-02-27T17:20:00.000-08:002009-02-27T17:20:00.000-08:00I had to disable additional comments due to spam. ...I had to disable additional comments due to spam. Please post your comments and suggestions at our forum:<BR/><BR/>http://communities.vmware.com/community/vmtn/general/guestdebugmonitor<BR/><BR/>Thank you.Slavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-36982508411409971992008-12-18T14:31:00.000-08:002008-12-18T14:31:00.000-08:00Thank you. This is exactly what I needed it.I wou...Thank you. This is exactly what I needed it.<BR/><BR/>I would like to debug a Linux kernel but from a Mac OSX machine (Linux kernel will run on a vm). <BR/><BR/>How can I do that? <BR/><BR/>Thanks!Unknownhttps://www.blogger.com/profile/06549689626021765639noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-52621738280378453362008-05-13T01:40:00.000-07:002008-05-13T01:40:00.000-07:00Hi Slava,I downloaded a 30 day evaluation version ...Hi Slava,<BR/><BR/>I downloaded a 30 day evaluation version for Linux viz. 6.0.3 build- 80004. I put the line as per your specification in .vmx file and then rebooted the OS but I do not see the vmware.log message which you have mentioned. I am running OpenSuse 10.1 with kernel 2.6.18.2-34. I have a question on the kernel symbol file which you have mentioned in the gdb file command. I could find a rpm for my kernel symbol version, and installed it but I am not able to see the file which you have mentioned in the invocation of gdb. Could you tell me more on that? like where kernel symbol table files get installed and what would be the file for my version as mentioned above. I am really stuck on an issue related to a kernel panic and need the debug environment as soon as possible.<BR/><BR/>Thank you,<BR/>MrunalMrunal Gawadehttps://www.blogger.com/profile/04825480130922051485noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-66550897676199397232008-03-12T04:21:00.000-07:002008-03-12T04:21:00.000-07:00This comment has been removed by the author.Vincenzo Iozzohttps://www.blogger.com/profile/18420483741962419213noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-35709541010224831142007-11-10T15:48:00.000-08:002007-11-10T15:48:00.000-08:00Hello,I'm writing a Network Boot Program running i...Hello,<BR/><BR/>I'm writing a Network Boot Program running in the PXE environment. How do I use VMWare's Record/Replay to debug it?<BR/><BR/>Thanksbenhttps://www.blogger.com/profile/05178663369153841370noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-70982784421357900182007-09-24T22:42:00.000-07:002007-09-24T22:42:00.000-07:00Hi,Replay debugging now has dedicated Community F...Hi,<BR/><BR/>Replay debugging now has dedicated <A HREF="http://communities.vmware.com/community/vmtn/general/guestdebugmonitor" REL="nofollow">Community Forum secton</A>. I would appreciate if additional comments are posted there, so that other engineers and customers can participate in discussion too. Thank you.Slavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-13203737978072925742007-09-24T22:37:00.000-07:002007-09-24T22:37:00.000-07:00To Bradley: hardware breakpoints should work in WS...To Bradley: hardware breakpoints should work in WS6 RC2 or later. The gdb didn't know about the int3 that you put manually, so it passed it to the Guest OS and it couldn't handle it.<BR/><BR/>I suspect you have hit a bug. I would like to ask you a few questions, but blogspot comments are not really suitable for discussions. Could you please repost the question in <A HREF="http://communities.vmware.com/community/vmtn/general/guestdebugmonitor" REL="nofollow">Community Forums</A>? I will follow up there. Thank you!Slavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-89529616975404429132007-09-24T22:27:00.000-07:002007-09-24T22:27:00.000-07:00To orenl: I haven't tried it with linux modules, b...To orenl: I haven't tried it with linux modules, but generally you need to tell gdb location of the sections of the module you are interested in. The gdb "add-symbol-file" command does this in addition to providing gdb with symbols. Depending on your kernel version, you can get section information from "insmod -m", /proc/ksyms, etc...Slavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-15400887945343214832007-09-17T01:18:00.000-07:002007-09-17T01:18:00.000-07:00Do you have hardware assisted breakpoints working?...Do you have hardware assisted breakpoints working? They appear to silently fail for me. <BR/><BR/>Taking an alternative route, I have also tried manually inserting an INT3 instruction, but this causes a kernel stack fault.Bradley Schatzhttps://www.blogger.com/profile/06684308186736224837noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-42972012386773248632007-07-23T17:16:00.000-07:002007-07-23T17:16:00.000-07:00This is indeed very useful !I tried it already and...This is indeed very useful !<BR/><BR/>I tried it already and managed to work with a running linux kernel. As I work a lot with loadable modules, I would like to be able to debug code in modules. However, I couldn't figure out how to convince gdb to load symbols for loadable modules. Is it possible, and if so how ?<BR/><BR/>Thanks.. Oren.orenlhttps://www.blogger.com/profile/03861700314138268722noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-6367970985834185022007-06-28T19:01:00.000-07:002007-06-28T19:01:00.000-07:00Olivier,Yes and no. Since WS6 support gdb as exter...Olivier,<BR/><BR/>Yes and no. Since WS6 support gdb as external debugger, you can debug Windows kernel at the instruction level, but symbol-level debugging is not available.Slavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-36711493517956946542007-06-26T06:19:00.000-07:002007-06-26T06:19:00.000-07:00Is it possible to debug Windows or Windows Kernel ...Is it possible to debug Windows or Windows Kernel with this functionality ?Unknownhttps://www.blogger.com/profile/11970964579928027286noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-30624509578857748892007-05-16T12:39:00.000-07:002007-05-16T12:39:00.000-07:00Hi Slava,It did work on both Windows and Linux hos...Hi Slava,<BR/><BR/>It did work on both Windows and Linux host, as you said, without wait. But thats good. If you can provide a tunable parameter that determines if the VM is going to block or not, that might be useful.<BR/><BR/>Some more questions.<BR/><BR/>Is this feature going to be available with 'Fusion' on Mac OS X?<BR/>Does this feature work with a product like 'Insight' which is a GUI front end for gdb?<BR/><BR/>Thanks for your help<BR/><BR/>ManishAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-78115448233791664512007-05-14T11:54:00.000-07:002007-05-14T11:54:00.000-07:00Manish,Thanks for noticing this! The release build...Manish,<BR/><BR/>Thanks for noticing this! The release build will not print the message to the console, but you can find the message in the vmware.log file, and you will be able to attach to running VM with gdb running on the Host. I just double checked that with WS60 GA build 45731.<BR/><BR/>The VM is waiting for debugger asynchronously, so VM will be running as usual until debugger attaches. Let me know if this is inconvenient.<BR/><BR/>Once again, thank you for the comment. I will update the article.<BR/><BR/>P.S. The RHEL5 uses dynamically relocatable kernel. You may need to tell gdb where its sections are loaded to make symbols match.Slavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-87340282150251823782007-05-11T20:33:00.000-07:002007-05-11T20:33:00.000-07:00BTW, I am running RedHat Enterprise Linux v5.0 in ...BTW, I am running RedHat Enterprise Linux v5.0 in the guest.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-5626970893824028892007-05-11T20:30:00.000-07:002007-05-11T20:30:00.000-07:00I forgot to mention, I am using the GA version (#4...I forgot to mention, I am using the GA version (#45731)of WS6 on both Windows and Linux host.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-43744197260060987582007-05-11T20:28:00.000-07:002007-05-11T20:28:00.000-07:00I tried this option both in WS6 on Windows and Lin...I tried this option both in WS6 on Windows and Linux host but I don't get the waiting message and the VM just boots normally without waiting.<BR/><BR/>What am i missing?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-29990112502874373782007-04-27T22:30:00.000-07:002007-04-27T22:30:00.000-07:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/00487440923102678060noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-28683083472847134892007-04-25T03:45:00.000-07:002007-04-25T03:45:00.000-07:00This comment has been removed by the author.Vivekhttps://www.blogger.com/profile/09736006443495581399noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-51470068647697964512007-04-23T18:35:00.000-07:002007-04-23T18:35:00.000-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/16528731588439271367noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-88927790630596036552007-04-23T13:03:00.000-07:002007-04-23T13:03:00.000-07:00Hi pacifist. The WS6 uses remote gdb protocol:http...Hi pacifist. The WS6 uses remote gdb protocol:<BR/><BR/>http://sourceware.org/gdb/onlinedocs/gdb_33.html<BR/><BR/>I'd like to talk to you about debugger your company is developing. How can I contact you?Slavahttps://www.blogger.com/profile/11817787238843961916noreply@blogger.comtag:blogger.com,1999:blog-3629493929841862986.post-74375357474471202122007-04-22T04:14:00.000-07:002007-04-22T04:14:00.000-07:00My company has its own internal debugger that targ...My company has its own internal debugger that targets 32-bit Windows, 64-bit Windows (Itanium and x64), linux, IBM Z/OS, and several other platforms. Will you be publishing this interface at some point so we can add support to our debugger?Anonymoushttps://www.blogger.com/profile/16528731588439271367noreply@blogger.com