[dump_syms][riscv] Fix register name mismatch

dump_syms was using x0...x31 notation, while the rest of Breakpad was
using the ABI names. This mismatch was causing stackwalking to not fully
succeed.

Fixed: 1432426
Change-Id: I0713e76e65ff6dad492b51bc3607e94e25dc2c3a
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4505156
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Thomas Gales 2023-05-04 23:07:34 +00:00 committed by Joshua Peraza
parent 837b0f5d52
commit 5b101544ca

View file

@ -149,10 +149,10 @@ vector<string> DwarfCFIToModule::RegisterNames::MIPS() {
vector<string> DwarfCFIToModule::RegisterNames::RISCV() { vector<string> DwarfCFIToModule::RegisterNames::RISCV() {
static const char *const names[] = { static const char *const names[] = {
"x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "pc", "ra", "sp", "gp", "tp", "t0", "t1", "t2",
"x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "s0", "s1", "a0", "a1", "a2", "a3", "a4", "a5",
"x16", "x17", "x18", "x19", "x20", "x21", "x22", "x23", "a6", "a7", "s2", "s3", "s4", "s5", "s6", "s7",
"x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31", "s8", "s9", "s10", "s11", "t3", "t4", "t5", "t6",
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",