mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
[MachCore] Report arm64 thread exception state
A MachO userspace corefile may contain LC_THREAD commands which specify thread exception state. For arm64* only (for now), report a human-readable version of this state as the thread stop reason, instead of 'SIGSTOP'. As a follow-up, similar functionality can be implemented for x86 cores by translating the trapno/err exception registers. rdar://82898146 Differential Revision: https://reviews.llvm.org/D109795
This commit is contained in:
@@ -745,13 +745,14 @@ public:
|
||||
PrintRegisterValue(reg_ctx, "sp", nullptr, 8, data);
|
||||
PrintRegisterValue(reg_ctx, "pc", nullptr, 8, data);
|
||||
PrintRegisterValue(reg_ctx, "cpsr", nullptr, 4, data);
|
||||
data.PutHex32(0); // uint32_t pad at the end
|
||||
|
||||
// Write out the EXC registers
|
||||
// data.PutHex32 (EXCRegSet);
|
||||
// data.PutHex32 (EXCWordCount);
|
||||
// WriteRegister (reg_ctx, "far", NULL, 8, data);
|
||||
// WriteRegister (reg_ctx, "esr", NULL, 4, data);
|
||||
// WriteRegister (reg_ctx, "exception", NULL, 4, data);
|
||||
data.PutHex32(EXCRegSet);
|
||||
data.PutHex32(EXCWordCount);
|
||||
PrintRegisterValue(reg_ctx, "far", NULL, 8, data);
|
||||
PrintRegisterValue(reg_ctx, "esr", NULL, 4, data);
|
||||
PrintRegisterValue(reg_ctx, "exception", NULL, 4, data);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user