Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion HexRaysPyTools/callbacks/scanners.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ def activate(self, ctx):
NewDeepSearchVisitor(cfunc, 0, obj, cache.temporary_structure).process()

def update(self, ctx):
if ctx.form_type == idaapi.BWN_FUNCS:
try:
# IDA >= 9
type_ = ctx.widget_type
except:
type_ = ctx.form_type

if type_ == idaapi.BWN_FUNCS:
idaapi.attach_action_to_popup(ctx.widget, None, self.name)
return idaapi.AST_ENABLE_FOR_WIDGET
return idaapi.AST_DISABLE_FOR_WIDGET
Expand Down
8 changes: 7 additions & 1 deletion HexRaysPyTools/core/const.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import idaapi
import ida_ida

EA64 = None
EA_SIZE = None
Expand Down Expand Up @@ -33,7 +34,12 @@ def init():
PX_WORD_TINFO, DUMMY_FUNC, CONST_PCHAR_TINFO, CHAR_TINFO, PCHAR_TINFO, CONST_VOID_TINFO, \
WORD_TINFO, PWORD_TINFO, EA64, EA_SIZE

EA64 = idaapi.get_inf_structure().is_64bit()
try:
EA64 = idaapi.get_inf_structure().is_64bit()
except:
# IDA 9
EA64 = not ida_ida.inf_is_32bit_exactly()

EA_SIZE = 8 if EA64 else 4

VOID_TINFO = idaapi.tinfo_t(idaapi.BT_VOID)
Expand Down
7 changes: 6 additions & 1 deletion HexRaysPyTools/core/helper.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import collections
import logging

import ida_ida
import idaapi
import idc

Expand All @@ -20,7 +21,11 @@ def is_imported_ea(ea):


def is_code_ea(ea):
if idaapi.cvar.inf.procname == "ARM":
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is same change at line 46 to be applied

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

I actually hit that case a few hours after those commits but only fixed it in-place (doh!)

Thanks for this tool btw!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you like to change it, or shall I? Either is fine, but I am AFK at the moment

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not any related to authors, was looking if anyone have already updated to ida 9 =)

try:
procname = ida_ida.inf_get_procname()
except:
procname = idaapi.cvar.inf.procname
if procname == "ARM":
# In case of ARM code in THUMB mode we sometimes get pointers with thumb bit set
flags = idaapi.get_full_flags(ea & -2) # flags_t
else:
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ About

The plugin assists in the creation of classes/structures and detection of virtual tables. It also facilitates transforming decompiler output faster and allows to do some stuff which is otherwise impossible.

**Note**: The plugin supports IDA Pro 7.x with Python 2/3.
**Note**: The plugin supports IDA Pro 7.x with Python 2/3; it loads in IDA Pro 9.x with Python 3 but has not yet been extensively tested

Installation
============
Expand Down