kern: implement thread call stack debug

This commit is contained in:
Michael Scire 2020-12-09 22:49:04 -08:00
parent 16e2f46aed
commit af259eabda
11 changed files with 657 additions and 32 deletions

View file

@ -44,6 +44,9 @@ namespace ams::kern::arch::arm64 {
static uintptr_t GetProgramCounter(const KThread &thread);
static void SetPreviousProgramCounter();
static void PrintRegister(KThread *thread = nullptr);
static void PrintBacktrace(KThread *thread = nullptr);
static Result BreakIfAttached(ams::svc::BreakReason break_reason, uintptr_t address, size_t size);
static Result SetHardwareBreakPoint(ams::svc::HardwareBreakPointRegisterName name, u64 flags, u64 value);
@ -61,8 +64,6 @@ namespace ams::kern::arch::arm64 {
}
}
}
/* TODO: This is a placeholder definition. */
};
}

View file

@ -273,6 +273,10 @@ namespace ams::kern::arch::arm64 {
return this->page_table.GetHeapPhysicalAddress(address);
}
KVirtualAddress GetHeapVirtualAddress(KPhysicalAddress address) const {
return this->page_table.GetHeapVirtualAddress(address);
}
KBlockInfoManager *GetBlockInfoManager() {
return this->page_table.GetBlockInfoManager();
}