mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 19:10:26 +00:00
LibCoredump+CrashReporter: Make CrashReporter work on AArch64
This commit implements printing out the AArch64 register file and generating backtraces. Tested to work on the sshd port.
This commit is contained in:
parent
ed13b7beb6
commit
ff2fa72e28
Notes:
sideshowbarker
2024-07-16 21:09:14 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/ff2fa72e28 Pull-request: https://github.com/SerenityOS/serenity/pull/18466 Reviewed-by: https://github.com/nico ✅
2 changed files with 11 additions and 5 deletions
|
@ -131,8 +131,15 @@ static TitleAndText build_cpu_registers(const ELF::Core::ThreadInfo& thread_info
|
|||
builder.appendff("r12={:p} r13={:p} r14={:p} r15={:p}\n", regs.r12, regs.r13, regs.r14, regs.r15);
|
||||
builder.appendff("rip={:p} rflags={:p}", regs.rip, regs.rflags);
|
||||
#elif ARCH(AARCH64)
|
||||
(void)regs;
|
||||
TODO_AARCH64();
|
||||
builder.appendff("Stack pointer sp={:p}\n", regs.sp);
|
||||
builder.appendff("Program counter pc={:p}\n", regs.pc);
|
||||
builder.appendff(" x0={:p} x1={:p} x2={:p} x3={:p} x4={:p}\n", regs.x[0], regs.x[1], regs.x[2], regs.x[3], regs.x[4]);
|
||||
builder.appendff(" x5={:p} x6={:p} x7={:p} x8={:p} x9={:p}\n", regs.x[5], regs.x[6], regs.x[7], regs.x[8], regs.x[9]);
|
||||
builder.appendff("x10={:p} x11={:p} x12={:p} x13={:p} x14={:p}\n", regs.x[10], regs.x[11], regs.x[12], regs.x[13], regs.x[14]);
|
||||
builder.appendff("x15={:p} x16={:p} x17={:p} x18={:p} x19={:p}\n", regs.x[15], regs.x[16], regs.x[17], regs.x[18], regs.x[19]);
|
||||
builder.appendff("x20={:p} x21={:p} x22={:p} x23={:p} x24={:p}\n", regs.x[20], regs.x[21], regs.x[22], regs.x[23], regs.x[24]);
|
||||
builder.appendff("x25={:p} x26={:p} x27={:p} x28={:p} x29={:p}\n", regs.x[25], regs.x[26], regs.x[27], regs.x[28], regs.x[29]);
|
||||
builder.appendff("x30={:p}", regs.x[30]);
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
|
|
@ -48,9 +48,8 @@ Backtrace::Backtrace(Reader const& coredump, const ELF::Core::ThreadInfo& thread
|
|||
auto start_bp = m_thread_info.regs.rbp;
|
||||
auto start_ip = m_thread_info.regs.rip;
|
||||
#elif ARCH(AARCH64)
|
||||
auto start_bp = 0;
|
||||
auto start_ip = 0;
|
||||
TODO_AARCH64();
|
||||
auto start_bp = m_thread_info.regs.x[29];
|
||||
auto start_ip = m_thread_info.regs.pc;
|
||||
#else
|
||||
# error Unknown architecture
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue