{
targetMachine = AMD64Machine::GetInstance();
}
-#endif // SOS_TARGET_AMD64
-#ifdef SOS_TARGET_X86
+#elif defined(SOS_TARGET_X86)
if (targetArchitecture == IMAGE_FILE_MACHINE_I386)
{
targetMachine = X86Machine::GetInstance();
}
-#endif // SOS_TARGET_X86
-#ifdef SOS_TARGET_ARM
+#elif defined(SOS_TARGET_ARM)
if (targetArchitecture == IMAGE_FILE_MACHINE_ARMNT)
{
targetMachine = ARMMachine::GetInstance();
}
-#endif // SOS_TARGET_ARM
-#ifdef SOS_TARGET_ARM64
+#elif defined(SOS_TARGET_ARM64)
if (targetArchitecture == IMAGE_FILE_MACHINE_ARM64)
{
targetMachine = ARM64Machine::GetInstance();
}
-#endif // SOS_TARGET_ARM64
+#else
+#error "Undefined target architecture"
+#endif
if (targetMachine == NULL)
{
g_targetMachine = NULL;
- ExtErr("SOS does not support the current target architecture.\n");
+ ExtErr("SOS does not support the current target architecture 0x%llx.\n", targetArchitecture);
return E_FAIL;
}
#define IMAGE_FILE_MACHINE_I386 0x014c // Intel 386.
#define IMAGE_FILE_MACHINE_ARMNT 0x01c4 // ARM Thumb-2 Little-Endian
#define IMAGE_FILE_MACHINE_AMD64 0x8664 // AMD64 (K8)
+#define IMAGE_FILE_MACHINE_ARM64 0xAA64 // ARM64 Little-Endian
// Execution status codes used for waiting,
// for returning current status and for
platform = CORDB_PLATFORM_POSIX_ARM;
break;
- case IMAGE_FILE_MACHINE_IA64:
case IMAGE_FILE_MACHINE_ARM64:
+ ulExpectedPointerSize = 8;
+ platform = CORDB_PLATFORM_POSIX_ARM64;
+ break;
+
+ case IMAGE_FILE_MACHINE_IA64:
_ASSERTE_MSG(false, "Not supported platform.");
return E_NOTIMPL;