oxidecomputer / oxidecomputer/humility

ARMRegisters enum being punned for two different things

Open
#140 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
584
Forks
63
Avg merge
3h
Merged PRs (30d)
2

Description

The ARMRegisters enum is used for two things:

  1. Register numbers used by the DAP for accessing CPU registers
  2. DWARF register numbers in the unwind tables

Thing is, these two cases only use the same numbers for r0-r15. Past r15 they diverge. So right now it's kind of working-by-accident since the DWARF unwind tables tend not to talk about PSR and whatnot; yesterday I fixed a panic if floating point registers appear. I think we should use two different enums with a mapping between them where required.

Here's the DWARF scheme: https://github.com/ARM-software/abi-aa/blob/main/aadwarf32/aadwarf32.rst#dwarf-register-names

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the ARMRegisters enum and trace its uses for DAP CPU-register access and DWARF unwind tables. Read the linked ARM DWARF register scheme and compare it with the existing numbering, including floating-point registers. Done means the two register-numbering concepts are represented separately with mappings where needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.