Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

Capstone? #2

Open
Open

Description

@zachriggle

Just curious why BinaryNinja has its own disassembler rather than re-using Capstone -- or contributing enhancements when it's insufficient.

Activity

  1. psifertex commented on Apr 20, 2015

    @psifertex
    Member

    Primarily because capstone didn't exist when binary ninja was started.

    That said, for the rewrite that's underway, we tested capstone and it was nearly an order of magnitude slower than the asmx86 library. (See the "Fast Disassembly" section of asmx86.) That performance problem is only going to get worse as we (and by "we", I mean primarily @D0ntPanic) add other planned features like emulation and analysis where the string-based output from capstone is even less appropriate.

    That said, it does make sense to use capstone for other architectures since it's a pain writing new disassemblers. That'll likely come in the new rewrite -- we're happy to accept PRs on the python version and will make a best effort to fix critical bugs in it, but we likely won't be porting new features back to it.

  2. zachriggle commented on Apr 20, 2015

    @zachriggle
    Author

    Is that slow-down using Capstone with the full semantic information, or the fast disassembler?

  3. D0ntPanic commented on Apr 20, 2015

    @D0ntPanic
    Member

    The performance test was done on the fast disassembly. Even the "diet" version, which has no string output support, was slower. However, that is comparing our C++ disassembler library with Capstone.

    For the Python version here, Capstone would likely be much faster, as native Python code is not fast. Capstone has much more complete instruction set support, and would likely be a better fit for the Python version. Pull requests are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions