Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
926 stars 209 forks source link

IHEX/SRC/TI-TXT views are fundamentally broken due to detached raw view #5890

Open jrozner opened 2 months ago

jrozner commented 2 months ago

Version and Platform (required):

Bug Description: The architectures don't register the new bintxt views so they are not selectable in open with options. It defaults to only allowing x86.

Steps To Reproduce: Please provide all steps required to reproduce the behavior:

  1. Open with options
  2. Select hex file
  3. Architectures are marked as read only
emesare commented 2 months ago

So after looking into this more, IHEX view and others (SREC, TI-TXT) are tainted by the mess that is BinaryView initialization, what I mean is that the view does not parent the raw view, and because of the raw views special role as the root view, holds data like load settings (i.e. the architecture you want to open the ihex view with).

The culprit for this detached state is: https://github.com/Vector35/binaryninja-api/blob/d041e78a06686290aaa4a465dffe3a0ae648ba02/view/bintxt/src/ihex.rs#L116

The work being done for https://github.com/Vector35/binaryninja-api/issues/133 will ultimately solve this

emesare commented 1 month ago

If this is not resolved prior to next stable then the views (IHEX, SRC and TI-TXT) will be disabled, pending further core changes tracked as apart of #133.