software-mansion / software-mansion/cairo-debugger
Handle variables of inline functions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7
- Forks
- 2
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 1
Description
We should construct FunctionVariables for each StackFrame, but currently we don't care about inlining (we are fine with the logic being wrong if there are more frames than 1 in a substack) since:
- We are in MVP stage.
- Only cases where inlining is present are
#[inline(always)]cases and they are rare (user can always comment out the attribute if they want to debug such a function).
To handle inlines, do as follows:
- Complete #41 first.
- When creating
FunctionVariableswhen we are on the given statement, we would still be, from sierra POV, in a body of a ONE function which may contain bodies of OTHER function that were inlined. For each statement from beginning of the function to the current statement: compare profiler mappings and current sierra call stack to tell if a statement is a part of inlined function body or "real" function body. Then based on that, assign the variable value to the proper function (so we would in fact createVec<FunctionVariables>).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Complete issue #41 first, then locate the construction of FunctionVariables for StackFrame. Compare profiler mappings with the current Sierra call stack for statements from the function start through the current statement, and verify that values are assigned to the proper inlined or real function in the resulting Vec.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100