Vector35 / Vector35/binaryninja-api

Support setting the return register via the type parser

Open
#3,845 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Type Parser Effort: Low Impact: Low
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

What is the feature you'd like to have?
When inputting a function type, it would be nice to have the ability to set the return register(s?) via some syntax similar to the parameter register locations. Something like:

int32_t @ r14 my_func()
int32_t my_func() @ r14

Is your feature request related to a problem?
It would be nice to have a convenient way to do this.

Are any alternative solutions acceptable?
The only ways to do this are via the Edit Function Properties dialog or the api.

Additional Information:
Requested via slack: https://binaryninja.slack.com/archives/C0CVALTLN/p1675183876516799

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

Start by locating the type parser and the existing syntax for parameter register locations, then compare that behavior with the Edit Function Properties dialog and API mentioned in the issue. Define and implement accepted return-register syntax, including the intended handling of multiple return registers, and verify that parsed function types set the same locations as those existing interfaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.