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

Fix and refactor fn extract_stack_info #299

Merged
merged 14 commits into from
Feb 10, 2022
Merged

Fix and refactor fn extract_stack_info #299

merged 14 commits into from
Feb 10, 2022

Conversation

Urhengulas
Copy link
Member

  • Fix the stack_range end.
    The high end of the stack is always initial_stack_pointer - 1.
  • Use range methods instead of variables.
  • Simplify accessing range of ram region
  • Introduce fn is_superset for two ranges.
    I am aware that in our concrete scenario we don't need all four, but
    only two conditions (as it was before), since we are checking
    subset.contains(superset.end()) before. But I have added them for
    completeness.
  • Document what fn extract_stack_info does
  • Simplify arguments of fn extract_stack_info

The high end of the stack is always `initial_stack_pointer - 1`.
I am aware that in our concrete scenario we don't need all four, but
only two conditions (as it was before), since we are checking
`subset.contains(superset.end())` before. But I have added them for
completeness.
src/target_info.rs Outdated Show resolved Hide resolved
src/target_info.rs Outdated Show resolved Hide resolved
@Urhengulas
Copy link
Member Author

@jonas-schievink The PR should be ready now. I tested it with the app-template and nrf52840-dk.

@jonas-schievink
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 10, 2022

Build succeeded:

@bors bors bot merged commit 1772aa5 into main Feb 10, 2022
@bors bors bot deleted the fix-stack-range-end branch February 10, 2022 16:21
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.

2 participants