-
Notifications
You must be signed in to change notification settings - Fork 376
fixed ida pro 7 beta6(170831) x86 crash and code refactor #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…inf.is_mf()/set_mf() -> is_be()/set_be()
…inf.is_mf()/set_mf() -> is_be()/set_be()
…inf.is_mf()/set_mf() -> is_be()/set_be()
…inf.is_mf()/set_mf() -> is_be()/set_be()
… inf.is_mf()/set_mf() -> is_be()/set_be()
… inf.is_mf()/set_mf() -> is_be()/set_be()
… inf.is_mf()/set_mf() -> is_be()/set_be()
… inf.is_mf()/set_mf() -> is_be()/set_be()
…mpatible with ida pro 6, 7(beta); for everyone is happy
…mpatible with ida pro 6, 7(beta); for everyone is happy
…mpatible with ida pro 6, 7(beta); for everyone is happy
…mpatible with ida pro 6, 7(beta); for everyone is happy
* fixed inf no attribute "mf", because ida pro beta 3 (170724) renamed inf.is_mf()/set_mf() -> is_be()/set_be() * fixed inf no attribute "mf", because ida pro7 beta 3 (170724) renamed inf.is_mf()/set_mf() -> is_be()/set_be() * Add ida pro version check, about be(big endian) * Since ida pro7 beta 3 (170724) renamed inf.mf -> is_be()/set_be(), Compatible with ida pro 6, 7(beta); for everyone is happy
|
@aquynh In the ida 7 for x64 python done refactoring operation, in order to be compatible with 695, in the configuration file python.cfg added // Should the plugin automatically load a 6.95 bw-compatibility layer? and the default value is yes # init.py
try:
import ida_idaapi
import ida_kernwin #importance
import ida_diskio
except ImportError as e:
print "Import failed: %s. Current sys.path:" % str(e)
for p in sys.path:
print "\t%s" % p
raiseida_kernwin.py import ida_idaapi
import sys
_BC695 = sys.modules["__main__"].IDAPYTHON_COMPAT_695_API #importance
# ...
if _BC695:
AST_DISABLE_FOR_FORM=AST_DISABLE_FOR_WIDGET
AST_ENABLE_FOR_FORM=AST_ENABLE_FOR_WIDGET
CB_CLOSE_IDB=CB_INVISIBLE
chtype_generic2=chtype_generic
chtype_segreg=chtype_srcp
close_tform=close_widget
find_tform=find_widget
get_current_tform=get_current_widget
get_highlighted_identifier=get_highlight
get_tform_title=get_widget_title
get_tform_type=get_widget_type
is_chooser_tform=is_chooser_widget
open_tform=display_widget
pyscv_get_tcustom_control=pyscv_get_widget
pyscv_get_tform=pyscv_get_widget
__read_selection70 = read_selection
def read_selection(*args): #importance
if len(args) == 0:
# bw-compat
t0, t1, view = twinpos_t(), twinpos_t(), get_current_viewer()
sel = __read_selection70(view, t0, t1)
import ida_idaapi
a0, a1 = ida_idaapi.BADADDR, ida_idaapi.BADADDR
if sel:
a0, a1 = t0.place(view).toea(), t1.place(view).toea()
return sel, a0, a1
else:
return __read_selection70(*args)
readsel2=read_selectionThe value of IDAPYTHON_COMPAT_695_API is determined by AUTOIMPORT_COMPAT_IDA695 = YES Similarly, we can see # idc.py
# Compatibility macros (auto-generated part. Comes first so
# that any re-definition below will override auto-generated part)
if sys.modules["__main__"].IDAPYTHON_COMPAT_695_API: # importance
# ...
from idc_bc695 import * |
|
Indeed the code in this PR appears to be fine. I just have a couple of suggestions regarding code style. In my initial pull request I was going for the minimal amount changes required to resolve errors I saw in the code. I've been playing around with a more thorough cleanup, but the code churn is significant and I want to be sure that I haven't introduced bugs in the process. |
|
merged, thanks! |
ida pro 7 beta6 x86, The idainfo object has still procName api
// python.cfg // Should the plugin automatically load a 6.95 bw-compatibility layer? AUTOIMPORT_COMPAT_IDA695 = YESida_kernwin.py