views:

227

answers:

1

I'm getting this exception when trying to use dbgeng from mdbglib: First-chance exception at 0x037ba4f4 (dbgeng.dll) in ASDumpAnalyzer.exe: 0xC000001D: Illegal Instruction. I'm wondering how to go about debugging this?

It is throwing on the assembly instruction vmcpuid. When I step over that instruction the code works as expected.

Stack trace:

dbgeng.dll!X86IsVirtualMachine()  + 0x44 bytes
dbgeng.dll!LiveUserDebugServices::GetTargetInfo()  + 0x95 bytes
dbgeng.dll!LiveUserTargetInfo::InitFromServices()  + 0x95 bytes
dbgeng.dll!LiveUserTargetInfo::WaitForEvent()  + 0x4f bytes
dbgeng.dll!WaitForAnyTarget()  + 0x5f bytes
dbgeng.dll!RawWaitForEvent()  + 0x2ae bytes
dbgeng.dll!DebugClient::WaitForEvent()  + 0xb0 bytes
[Managed to Native Transition]
mdbglib.dll!MS::Debuggers::DbgEng::DebugControl::WaitForEvent(unsigned int timeout = 0) Line 107 + 0x38 bytes   C++
mdbglib.dll!MS::Debuggers::DbgEng::Debuggee::WaitForEvent(unsigned int timeout = 0) Line 365    C++
ASDumpAnalyzer.exe!ASDumpAnalyzer.Program.WriteMemoryDump() Line 51 + 0xd bytes C#
ASDumpAnalyzer.exe!ASDumpAnalyzer.Program.Main() Line 21 + 0x5 bytes    C#
mscoree.dll!__CorExeMain@0()  + 0x34 bytes
kernel32.dll!_BaseProcessStart@4()  + 0x23 bytes
+1  A: 

Have you tried not breaking on first chance exceptions? I bet that X86IsVirtualMachine has a __try/__finally block around VMCPUID... since it's not a valid instruction you're probably not running under a VM.

Nathan Howell