software-mansion / software-mansion/cairo-debugger

Handle variables of inline functions

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

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:

  1. We are in MVP stage.
  2. 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:

  1. Complete #41 first.
  2. When creating FunctionVariables when 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 create Vec<FunctionVariables>).

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.