Provide a List of Call Sites That is Free of Synthetic Builtin Functions

Open
#7,847 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start with the Python binaryninja.function call-site property and the core.BNGetFunctionCallSites(self.handle, count) entry point mentioned in the issue. Trace how .synthetic_builtins and IL traversal currently identify synthetic functions; done means exposing a call-site list that excludes those functions without requiring callers to generate and traverse IL.

Written by the indexing model from the issue text.

Description

What is the feature you'd like to have?
Add a new function property which returns a list of call sites that excludes any function in .synthetic_builtins.

Is your feature request related to a problem?
I have to add code to exclude these synthetic functions from my list of call sites. The only way this can be done is to have one of the ILs that includes the synthetics generated and then to traverse it to exclude synthetics. This is not ideal. I looked at the Python source for binaryninja.function and the list of call sites comes from core.BNGetFunctionCallSites(self.handle, count). It seems like the most optimal place to fix this is to add a flag/parameter to this call that excludes synthetics, but you all can determine the best fix. It probably should happen over the C++ border not in Python.

Are any alternative solutions acceptable?
I have a slow, in Python, cleaner function that traverses IL and excludes synthetics.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

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.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.