Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Refactor stack painting #331

Merged
merged 6 commits into from
Jul 21, 2022
Merged

Refactor stack painting #331

merged 6 commits into from
Jul 21, 2022

Conversation

Urhengulas
Copy link
Member

@Urhengulas Urhengulas commented Jul 20, 2022

Most notably:

  • set registers using probe-rs, not in the subroutine anymore
    → this enables to have the subroutine as a const array, and makes the subroutine way smaller
  • bundle assertions in assert_subroutine! macro
    → macro and not fn to preserve correct location in the panic message
  • encapsulate function and subroutine in a module
  • greatly improve documentation
  • rename arguments start and end to low_addr and high_addr
  • use low_addr and stack_size as arguments

(This PR can be considered a preparation for #327)

Most notably:
- set registers using probe-rs, not in the subroutine anymore
  → this enables to have the subroutine as a const array
- bundle assertions in `assert_subroutine!` macro
  → macro and not fn to preserve correct location in the panic message
- encapsulate function and subroutine in a module
- greatly improve documentation
@Urhengulas Urhengulas changed the title Refactor paint stack Refactor stack painting Jul 20, 2022
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/canary.rs Outdated Show resolved Hide resolved
src/canary.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@jonathanpallant jonathanpallant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some queries to answer, but otherwise looks good.

@Urhengulas
Copy link
Member Author

bors r=jonathanpallant

@bors
Copy link
Contributor

bors bot commented Jul 21, 2022

Build succeeded:

@bors bors bot merged commit bcaf997 into main Jul 21, 2022
@bors bors bot deleted the refactor-paint-stack branch July 21, 2022 09:17
@Urhengulas Urhengulas mentioned this pull request Jun 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants