binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

add_auto_segments and add_auto_sections both require native objects

Open psifertex opened this issue 3 weeks ago • 2 comments

Both of the add_auto_* APIs that make batch sections and segments in python currently require you to construct a native object to use the API. This is not pythonic and we should likely match the syntax of the singular APIs and take a list of a list of those parameters. Or at a minimum we should have helper wrappers to make it more straight forward to do that.

https://dev-api.binary.ninja/search.html?q=add_auto&check_keywords=yes&area=default

add_auto_segments(segments: List[BNSegmentInfo])→ None[source]

psifertex avatar Dec 02 '25 21:12 psifertex

I'm putting this on the J release since while the segments API is not new, we're compounding the issue by adding a section version in 5.3 and it would be good to avoid going down the wrong path.

psifertex avatar Dec 02 '25 21:12 psifertex

Will also need to do the same for the C++ API

emesare avatar Dec 03 '25 16:12 emesare