Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine if process dump was generated on x64 or x86 machine

If I have a process dump file, is there anyway of knowing if the dump was generated on a x64 machine or x86 machines?

like image 636
Silverlight Student Avatar asked Nov 10 '11 18:11

Silverlight Student


2 Answers

You can look at the environment variables. Output of command !peb, among other things, contains list of environment variables. If you see variables PROCESSOR_ARCHITEW6432 or ProgramW6432 defined, the OS is 64 bit. Otherwise, it is 32 bit.

like image 115
seva titov Avatar answered Sep 30 '22 17:09

seva titov


Unfortunately, above answers don't work in most cases.

Dupmchk.exe will say "x86 compatible" for both x86 and x64 OS if the target process was built as x86 binary. And !peb command also gives you useless "PEB NULL..." for minidumps which we use most of the time.

You would better check the full path of "Kernel32.dll" since x64 OS will load "C:\Windows\Syswow64\Kernel32.dll" instead while x86 OS will load the plain "C:\Windows\System32\Kernel32.dll" for x86 executables. Loaded modules and their paths are recoreded in minidump and easily checked by dumpchk.exe, windbg and Visual Studio.

like image 22
UJ Choi Avatar answered Sep 30 '22 16:09

UJ Choi