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

Allow adding platform types through API

Open SlidyBat opened this issue 4 years ago • 4 comments

At the moment platform types / syscalls can be added through files in types/platform folder, but would be nice if it was possible to add them through API as well.

My use case is that I have a custom architecture where the syscall numbers differ from one binary to another, but they contain debug info that tells you what the syscalls correspond to. I would like to add these syscalls based on the debug info via the API.

SlidyBat avatar Aug 28 '20 14:08 SlidyBat

We've got a planned change coming to dev in the next few days that will allow you to do this (though not using a platform type, but through some new changes in the type library system)

As soon as that code lands @rssor will chime in with the way you can solve this.

psifertex avatar Oct 05 '20 18:10 psifertex

Any updates on this? Been more than a few days 😛

SlidyBat avatar Dec 03 '20 14:12 SlidyBat

Sorry about the delay, was writing up the example code for how this can be accomplished with ephemeral typelibraries and realized it makes more sense for me to just plumb this through directly as a new set of methods on BinaryView objects. I'll follow up with the interim workaround using typelibraries shortly, but I'd recommend not using it since the new methods won't be far behind.

rssor avatar Dec 09 '20 19:12 rssor

Related to https://github.com/Vector35/binaryninja-api/issues/2773

xusheng6 avatar Jul 15 '22 03:07 xusheng6