Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC-V support #838

Open
luser opened this issue May 4, 2023 · 0 comments
Open

RISC-V support #838

luser opened this issue May 4, 2023 · 0 comments
Labels
breakpad-parity Feature parity with google-breakpad enhancement Would improve the quality of the project, but isn't causing problems help wanted

Comments

@luser
Copy link
Collaborator

luser commented May 4, 2023

I glanced at the breakpad-dev mailing list and noticed that in September, support for RISC-V minidumps from Linux was merged.

At a minimum, adding the RISC-V CPU context values would be useful, so that RISC-V minidumps don't show up as an unknown CPU, and we don't accidentally allocate conflicting values:
https://github.com/google/breakpad/blob/837b0f5d52701df4a88b94eaa8b0a093e33ff45d/src/google_breakpad/common/minidump_format.h#L687-L688

The next step from that would be to add matching CPU context structs for RISC-V 32/64, so CPU contexts could be parsed and displayed:
https://github.com/google/breakpad/blob/837b0f5d52701df4a88b94eaa8b0a093e33ff45d/src/google_breakpad/common/minidump_cpu_riscv.h

Porting the stackwalker implementations for RISC-V 32/64 should provide full parity with the breakpad implementation. That'd be a much larger chunk of work, and unless someone using these crates needs it it doesn't seem terribly important, but it could be a fun exercise for someone to practice writing Rust:
https://github.com/google/breakpad/blob/28cf16bc342c0e39f867ccc1a30357a803b9a15a/src/processor/stackwalker_riscv.cc
https://github.com/google/breakpad/blob/837b0f5d52701df4a88b94eaa8b0a093e33ff45d/src/processor/stackwalker_riscv64.cc

There are unit tests for the stackwalker implementations that could be ported alongside to verify correctness:
https://github.com/google/breakpad/blob/28cf16bc342c0e39f867ccc1a30357a803b9a15a/src/processor/stackwalker_riscv_unittest.cc
https://github.com/google/breakpad/blob/28cf16bc342c0e39f867ccc1a30357a803b9a15a/src/processor/stackwalker_riscv64_unittest.cc

@luser luser added enhancement Would improve the quality of the project, but isn't causing problems help wanted breakpad-parity Feature parity with google-breakpad labels May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breakpad-parity Feature parity with google-breakpad enhancement Would improve the quality of the project, but isn't causing problems help wanted
Projects
None yet
Development

No branches or pull requests

1 participant