Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Emulation originally (and when used correctly) refers to the interfaces of two different things.
Exactly! You're arguing my own point! two *different* things! You can't "emulate" a piece of hardware using that same piece of hardware. When code is run natively, it is no longer emulation.
(I get the feeling that someone thinks a program (VMware) isn't different from a hardware device (a PC).)
This doesn't even make any sense, so I'm not going to go into it.
This thread is actually making my blood boil - I'm going to attempt not to respond any more, but if you goad me enough I may just do.
JamesM wrote:
This thread is actually making my blood boil - I'm going to attempt not to respond any more, but if you goad me enough I may just do.
Wow! I've just asked for a method to debug VMWare.
The result is a 16-answers post with lots of people with the boiling blood for a simple discussion on what is an emulator and what is not.
I didn't think this would have happened with an easy question like mine...
The next time, before I open a new thread, I will think on what might be the consequences for the global humor on this forum
Hopefully you have gleaned why debugging on VMWare is so much more difficult than debugging on Bochs though . My suggestion to you is as follows:
1. Use Bochs in two situations - when you cannot output to the display device or COM port, for some reason (in the early stages of development, for example), or when you are getting triple faults which are not caught by your OS.
2. Use VMWare or another system which uses virtualisation when you have got a bit further on and your OS is smart enough to catch the error and display useful debug output.
I use Bochs because I am developping an OS on two machines. One of these machines has a 32 bit processor, but I need 64 bit emulation. Bochs is ideal for this. When I get to use the 64 bit machine, I use virtualisation.
AlfaOmega08 wrote:
VMWare is so much better. The only thing it needs is a debugger. Does anyone know how to debug a vmware virtual machine?
I see that nobody has bothered to attempt to answer this, so allow me.
VMWare Server 2.0 (now in beta) DOES have a GDB remote debugging stub. I use it all the time. I forget the exact details, but they're available in another post somewhere here on the forum (made by someone who claims to work for VMWare), and they're available on the VMWare site itself.
Wow! I've just asked for a method to debug VMWare.
IIRC your first post was actually a flame about how terrible bochs is and how it's a poor emulator. If that doesn't invite flame responses, I don't know what does.
Emulation originally (and when used correctly) refers to the interfaces of two different things.
Exactly! You're arguing my own point! two *different* things! You can't "emulate" a piece of hardware using that same piece of hardware. When code is run natively, it is no longer emulation.
Uh. VMware Workstation does binary translation for "dangerous" applications (which means it has to examine the code anyways to see if it's dangerous). It replaces "bad" instructions with calls to emulation code. VMware Workstation is not a normal virtual machine monitor that just runs all code as is. (That would of course not be an emulator.)
I've got that information from mylearn.vmware.com, so it should be accurate.
Conway's Law: If you have four groups working on a compiler, you'll get a 4-pass compiler. Melvin Conway
Well, Virtual PC seems to have an elements of emulation. I did some programming PIT and internal PC-speaker, but run on VPS the sound was coming from my stereo-out spreakers (or through the sound card) and actually the calculated frequency was not real (or on VPS I can hear sounds up to 44 KHz, while normal human ear hears up to 20-21 KHz). It seems that VPC also have an emolation system for handling "dangerous" code.
Emulation originally (and when used correctly) refers to the interfaces of two different things.
Exactly! You're arguing my own point! two *different* things! You can't "emulate" a piece of hardware using that same piece of hardware. When code is run natively, it is no longer emulation.
Uh. VMware Workstation does binary translation for "dangerous" applications (which means it has to examine the code anyways to see if it's dangerous). It replaces "bad" instructions with calls to emulation code. VMware Workstation is not a normal virtual machine monitor that just runs all code as is. (That would of course not be an emulator.)
I've got that information from mylearn.vmware.com, so it should be accurate.
While I do not disagree with what you've said, I would not class this instance of dynamic binary translation as emulation, as the subject architecture is still the target architecture. Yes, certain instructions may be emulated, but the majority of instructions are run on the target cpu (as with qemu).
JamesM wrote:
Exactly! You're arguing my own point! two *different* things! You can't "emulate" a piece of hardware using that same piece of hardware. When code is run natively, it is no longer emulation.
Uh. VMware Workstation does binary translation for "dangerous" applications (which means it has to examine the code anyways to see if it's dangerous). It replaces "bad" instructions with calls to emulation code. VMware Workstation is not a normal virtual machine monitor that just runs all code as is. (That would of course not be an emulator.)
I've got that information from mylearn.vmware.com, so it should be accurate.
While I do not disagree with what you've said, I would not class this instance of dynamic binary translation as emulation, as the subject architecture is still the target architecture. Yes, certain instructions may be emulated, but the majority of instructions are run on the target cpu (as with qemu).
But it's better to use an emulator like Bochs for testing? Or a software like VMWare or Qemu?
Wave wrote:Uh. VMware Workstation does binary translation for "dangerous" applications (which means it has to examine the code anyways to see if it's dangerous). It replaces "bad" instructions with calls to emulation code. VMware Workstation is not a normal virtual machine monitor that just runs all code as is. (That would of course not be an emulator.)
I've got that information from mylearn.vmware.com, so it should be accurate.
While I do not disagree with what you've said, I would not class this instance of dynamic binary translation as emulation, as the subject architecture is still the target architecture. Yes, certain instructions may be emulated, but the majority of instructions are run on the target cpu (as with qemu).
But it's better to use an emulator like Bochs for testing? Or a software like VMWare or Qemu?
Hi,
That really depends at what stage you are at. I would reccommend testing your OS on as many as you can (and real computers). If you're still struggling with paging, for example, bochs will provide extremely useful debugging facilities which the others won't. If you're past that stage, you may like the extra speed that the others have.
AlfaOmega08 wrote:As I know, Virtual PC tries to emulate as possible the machine it's running on.
I've discovered why the GDT doesn't works.
When you execute "CLI; HLT", bochs loads a new GDTR with base = 0 and limit = 0xFFFF. I've just changed the two instructions with JMP $ and now it works.
Also if you set realtime mode, the pit runs 10000 times faster
It *doesn't* crash. Try not to update ESP, just after GRUB. When the first CALL occours, on vmware you will experience a wonderful stack fault. On bochs, it works like it's all ok...
Hi, here is some representative of Bochs developers here
It is OK to hate Bochs if you want, but if you really think about some problem you could just come to Bochs developers forum or open a bug report instead of shouting, isn't ?
All proven bugs getting proper answer in relatively short time
I think I am safe in saying that the views expressed by the OP are not shared by the vast majority of people here.
Most of the time, when someone says that their OS crashing due to an error with Bochs, it is their OS code which is buggy, or does not take in to account the fact that Bochs starts with zeroed RAM, or does not delay the same as real hardware would for port IO. These are issues which are fine if you accept that Bochs is an emulator and even real PC's differ from one machine to the next.
Wave wrote:This is an emulator: "A device, computer program, or system that accepts the same inputs and produces the same outputs as a given system."
That is an incomplete definition. By that definition, a system could emulate itself. The definition should be extended with "not being that system" or the like. Merriam Webster puts it like this:
Merriam Webster wrote:hardware or software that permits programs written for one computer to be run on another computer
Which may not be entirely accurate either, but at least got the "different computers" right.