Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/coreclr/debug/crashreport/inproccrashreporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
saitama951 marked this conversation as resolved.
#error "Unsupported arch"
#endif
Expand Down Expand Up @@ -1241,6 +1245,15 @@ CrashReportHelpers::WriteRegistersToJson(
#define CRASH_MCREG_SP(uc) (static_cast<uint64_t>((uc)->uc_mcontext.__gregs[2]))
#define CRASH_MCREG_FP(uc) (static_cast<uint64_t>((uc)->uc_mcontext.__gregs[8]))

#elif defined(TARGET_S390X)
#define CRASH_MCREG_PC(uc) (static_cast<uint64_t>((uc)->uc_mcontext.psw.addr))
#define CRASH_MCREG_SP(uc) (static_cast<uint64_t>((uc)->uc_mcontext.gregs[15]))
#define CRASH_MCREG_FP(uc) (static_cast<uint64_t>((uc)->uc_mcontext.gregs[11]))

#elif defined(TARGET_POWERPC64)
#define CRASH_MCREG_PC(uc) (static_cast<uint64_t>((uc)->uc_mcontext.gp_regs[32]))
#define CRASH_MCREG_SP(uc) (static_cast<uint64_t>((uc)->uc_mcontext.gp_regs[1]))
#define CRASH_MCREG_FP(uc) (static_cast<uint64_t>((uc)->uc_mcontext.gp_regs[31]))
#else
Comment thread
saitama951 marked this conversation as resolved.
#error "Unsupported arch"
#endif
Expand Down
Loading