Vector35 / Vector35/binaryninja-api

Logger constructor python vs c++ inconsistency

Open
#7,106 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Python API Effort: Trivial 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?
First of all Logger constructor has different order of arguments in C++ and python. Then in C++ session_id can be omitted by the user, as it's default argument (with default value 0), however for some reason in python it's not.

Additional Information:

C++:
https://github.com/Vector35/binaryninja-api/blob/0fdf63426e186102906c1fb8b8e7107c058023ae/binaryninjaapi.h#L914

Python:
https://github.com/Vector35/binaryninja-api/blob/0fdf63426e186102906c1fb8b8e7107c058023ae/python/log.py#L200-L201

I think there is no-easy fix, as it may break a lot of scripts/software that using pythons Logger implementation, however i think it should be tracked as an issue (until the day X).

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 comparing the Logger declarations in binaryninjaapi.h around line 914 and python/log.py around lines 200-201, then inspect existing Logger call sites in both APIs. Determine the compatibility constraints for argument order and the optional session_id; the issue is done when the chosen behavior is implemented or the compatibility decision is clearly documented.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.