alexhude / uEmu

Tiny cute emulator plugin for IDA based on unicorn.
1.11k stars 177 forks source link

Fix "global name 'idaapi' is not defined" plugin bug #11

Closed joseph-hannon closed 6 years ago

joseph-hannon commented 6 years ago

Issue When using the "Show CPU Context" option in uEmu plugin in IDA 7.2 I get the following error:

Traceback (most recent call last):
  File "C:/Program Files/IDA 7.2/plugins/uEmu.py", line 114, in activate
    self.action_handler.handle_menu_action(self.action_type)
  File "C:/Program Files/IDA 7.2/plugins/uEmu.py", line 1557, in handle_menu_action
    [x.handler() for x in self.MENU_ITEMS if x.action == action]
  File "C:/Program Files/IDA 7.2/plugins/uEmu.py", line 1754, in show_cpu_context
    self.cpuContextView.Create("uEmu CPU Context")
  File "C:/Program Files/IDA 7.2/plugins/uEmu.py", line 458, in Create
    class Hooks(idaapi.UI_Hooks):
NameError: global name 'idaapi' is not defined

Cause Since the script doesn't use import idaapi can't access members like idaapi.*, change to using them directly.

alexhude commented 6 years ago

this issue is already addressed in upcoming commit

alexhude commented 6 years ago

Fixed in #0fa6c62