diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2023-04-22 17:00:25 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-23 14:30:59 +0200 |
commit | ff2fa72e2885ce7b99816a38ddce8857dde78c37 (patch) | |
tree | 230b3ceaadb4c4f9dffc186bf9fef2a704fc3103 /Userland/Applications | |
parent | ed13b7beb6eb2342486d1ee1ecbbb0c6405e2afa (diff) | |
download | serenity-ff2fa72e2885ce7b99816a38ddce8857dde78c37.zip |
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.
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/CrashReporter/main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index 7a502e92d0..01a62acbfa 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -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 |