diff options
author | Thomas Gales <tgales@google.com> | 2023-04-11 21:40:00 +0000 |
---|---|---|
committer | Joshua Peraza <jperaza@chromium.org> | 2023-04-11 21:51:18 +0000 |
commit | b1775c56b253e8f3c19e4ae8cfd67f9fe1fe45b1 (patch) | |
tree | 66b75c267a817f8605657d54431238097bb3c359 | |
parent | f6e42357d412e6d24a6a637752ae126c15819c9b (diff) | |
download | google-breakpad-b1775c56b253e8f3c19e4ae8cfd67f9fe1fe45b1.tar.gz |
Convert RISC-V numeric identifiers to strings
Printing the register values as part of the stack trace relies on the
CPU architecture being "riscv" or "riscv64" rather than the numeric
identifiers (0x8005 and 0x8006, respectively).
Fixed: 1432306
Test: Run `minidump_stackwalk` on a RISC-V minidump
Change-Id: I0009da687438d51047e2ee39ffa1c50d78798caa
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4416399
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
-rw-r--r-- | src/processor/minidump_processor.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/processor/minidump_processor.cc b/src/processor/minidump_processor.cc index d56a7d63..5ba6ff4f 100644 --- a/src/processor/minidump_processor.cc +++ b/src/processor/minidump_processor.cc @@ -633,6 +633,16 @@ bool MinidumpProcessor::GetCPUInfo(Minidump* dump, SystemInfo* info) { break; } + case MD_CPU_ARCHITECTURE_RISCV: { + info->cpu = "riscv"; + break; + } + + case MD_CPU_ARCHITECTURE_RISCV64: { + info->cpu = "riscv64"; + break; + } + default: { // Assign the numeric architecture ID into the CPU string. char cpu_string[7]; |