|
From: Jeremy F. <je...@go...> - 2004-01-25 03:07:14
|
On Sat, 2004-01-24 at 19:00, Dirk Mueller wrote: > Euhm, I'm curious: why that? > > It seems most sensible to me to actually emulate the host we're running on as > close as possible, instead of purposefully breaking the emulation by doing > stuff like returning a vendor string of "ValgrindVCPU". > > I'm pretty sure that developers do want to figure out why an application > doesn't work when it is not run under valgrind. when it is run under > valgrind, the same codepaths should be taken. > > Its hard to imagine what you were trying to fix here since though. Well, exactly that. We're so far from being like the underlying CPU, there's no point in pretending it is actually the underlying CPU. It still emulates all the important parts of the CPUID instruction, and any program which correctly uses CPUID will be fine. Programs which don't correctly use the CPUID instruction should be given the opportunity to fail so they can be fixed. Also, it means you could use CPUID to implement RUNNING_ON_VALGRIND, which may be useful (for example, if you want to special-case something, without actually having a source dependency on valgrind/*.h). J |