cah011 / binja-avr

AVR assembly plugin for Binary Ninja
MIT License
12 stars 11 forks source link

need to use BranchType enum for dev api #7

Closed lucasduffey closed 6 years ago

lucasduffey commented 7 years ago

crash when I try to create a function of arch type AVR

/home/user/.binaryninja/repositories/plugin_status.json doesn't exist
Loaded Python plugin 'binja-avr'
Analysis update took 0.006 seconds

Types for platform AVR failed to load: error: file '/home/user/binaryninja/types/platform/___.c' not found
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 315, in 'calling callback function'
  File "/home/user/binaryninja/plugins/../python/binaryninja/architecture.py", line 439, in _get_instruction_info
  File "/home/user/.binaryninja/plugins/binja-avr/__init__.py", line 1098, in perform_get_instruction_info
    result.add_branch(CallDestination, addr + dst*2 + 1*2)
NameError: global name 'CallDestination' is not defined
Analysis update took 0.003 seconds
lucasduffey commented 7 years ago

return types are now BranchType.return_type

__init__.py would need to reflect this to support latest binja API

Examples:

lucasduffey commented 7 years ago

Other changes

lucasduffey commented 7 years ago

I'm not sure if this applies to stable, so I'm not going to submit pull request yet

marcograss commented 7 years ago

I think you can submit now, stable requires those changes also (I also made them but since there is already the issue..)