diff --git a/src/coreclr/debug/crashreport/inproccrashreporter.cpp b/src/coreclr/debug/crashreport/inproccrashreporter.cpp index 64f3a451197ffb..8f90f92c0edd6e 100644 --- a/src/coreclr/debug/crashreport/inproccrashreporter.cpp +++ b/src/coreclr/debug/crashreport/inproccrashreporter.cpp @@ -58,6 +58,10 @@ static const char CRASHREPORT_ARCHITECTURE_NAME[] = "riscv64"; #elif defined(TARGET_LOONGARCH64) "loongarch64"; +#elif defined(TARGET_S390X) + "s390x"; +#elif defined(TARGET_POWERPC64) + "ppc64le"; #else #error "Unsupported arch" #endif @@ -1241,6 +1245,15 @@ CrashReportHelpers::WriteRegistersToJson( #define CRASH_MCREG_SP(uc) (static_cast((uc)->uc_mcontext.__gregs[2])) #define CRASH_MCREG_FP(uc) (static_cast((uc)->uc_mcontext.__gregs[8])) +#elif defined(TARGET_S390X) + #define CRASH_MCREG_PC(uc) (static_cast((uc)->uc_mcontext.psw.addr)) + #define CRASH_MCREG_SP(uc) (static_cast((uc)->uc_mcontext.gregs[15])) + #define CRASH_MCREG_FP(uc) (static_cast((uc)->uc_mcontext.gregs[11])) + +#elif defined(TARGET_POWERPC64) + #define CRASH_MCREG_PC(uc) (static_cast((uc)->uc_mcontext.gp_regs[32])) + #define CRASH_MCREG_SP(uc) (static_cast((uc)->uc_mcontext.gp_regs[1])) + #define CRASH_MCREG_FP(uc) (static_cast((uc)->uc_mcontext.gp_regs[31])) #else #error "Unsupported arch" #endif