Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Commit fbb5bfa

Browse files
author
elias.bachaalany@gmail.com
committed
IDA Pro 6.6 support
What's new: - added the decompiler bindings - Expose simpleline_t type to IDAPython. That lets the user to set the bgcolor & text for each line in the decompilation. - Wrapped new functions from the IDA SDK Various fixes: for non-code locations, idc.GetOpnd() would create instructions instead of returning empty result - idb_event::area_cmt_changed was never received in IDB_Hooks (and descendants) - idb_event::ti_changed, and idb_event::op_ti_changed notifications were not accessible in IDAPython - op_t.value was truncated to 32 bits under IDA64. - print_tinfo() wouldn't return a valid string. - readsel2() was not usable. - read_selection() was buggy for 64-bit programs. - StructMembers() considered holes in structures, and didn't properly iterate through the whole structure definition. - There was no way to call calc_switch_cases() from IDAPython. - when using multi-select/multi-edit choosers, erroneous event codes could be sent at beginning & end of batch deletion of lines. - When, in a PluginForm#OnCreate, the layout of IDA was requested to change (for example by starting a debugging session), that PluginForm could be deleted and create an access violation. - tinfo_t objects created from IDAPython could cause an assertion failure at exit time. - Usage of IDAPython's DropdownListControl was broken.
1 parent 1c6752d commit fbb5bfa

44 files changed

Lines changed: 3240 additions & 2440 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AUTHORS.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ The IDAPython Team:
88
* Hex-Rays - http://www.hex-rays.com/ - <support@hex-rays.com>
99

1010
Hex-Rays joined the IDAPython project in September 2009 and started contributing.
11-
It is primarily maintained by Arnaud Diederen.
11+
It is primarily maintained, updated and improved by Arnaud Diederen of Hex-Rays.
1212

13-
* Elias Bachaalany - http://0xeb.wordpress.com/
14-
15-
Current project owner and maintainer
13+
* Elias Bachaalany - elias.bachaalany@gmail.com
14+
Maintains IDAPython online source code repository and coordinates patches/updates/contributions from Hex-Rays and 3rd party contributors
15+
1616

1717
* Ero Carrera - http://dkbza.org/
1818

build.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
VERBOSE = True
2525

2626
IDA_MAJOR_VERSION = 6
27-
IDA_MINOR_VERSION = 5
27+
IDA_MINOR_VERSION = 6
2828

2929
if 'IDA' in os.environ:
3030
IDA_SDK = os.environ['IDA']
@@ -35,7 +35,7 @@
3535

3636
# IDAPython version
3737
VERSION_MAJOR = 1
38-
VERSION_MINOR = 6
38+
VERSION_MINOR = 7
3939
VERSION_PATCH = 0
4040

4141
# Determine Python version
@@ -339,13 +339,14 @@ def build_plugin(
339339
idasdkdir,
340340
plugin_name,
341341
options):
342+
""" Build the plugin from the SWIG wrapper and plugin main source """
343+
344+
global SWIG_OPTIONS
342345

343346
# Get the arguments
344347
ea64 = options[S_EA64]
345348
with_hexrays = options[S_WITH_HEXRAYS]
346349

347-
global SWIG_OPTIONS
348-
""" Build the plugin from the SWIG wrapper and plugin main source """
349350
# Path to the IDA SDK headers
350351
ida_include_directory = os.path.join(idasdkdir, "include")
351352

examples/ex_graph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -----------------------------------------------------------------------
2-
# This is an example illustrating how to use the graphing functionality in Python
2+
# This is an example illustrating how to use the user graphing functionality
3+
# in Python
34
# (c) Hex-Rays
45
#
56
from idaapi import GraphViewer

examples/vds1.py

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
import idaapi
2-
3-
def main():
4-
if not idaapi.init_hexrays_plugin():
5-
return False
6-
7-
print "Hex-rays version %s has been detected" % idaapi.get_hexrays_version()
8-
9-
f = idaapi.get_func(idaapi.get_screen_ea());
10-
if f is None:
11-
print "Please position the cursor within a function"
12-
return True
13-
14-
cfunc = idaapi.decompile(f);
15-
if cfunc is None:
16-
print "Failed to decompile!"
17-
return True
18-
19-
sv = cfunc.get_pseudocode();
20-
for i in xrange(0, sv.size()):
21-
line = idaapi.tag_remove(str(sv[i]));
22-
print line
23-
24-
return True
25-
26-
if main():
27-
idaapi.term_hexrays_plugin();
1+
import idaapi
2+
3+
def main():
4+
if not idaapi.init_hexrays_plugin():
5+
return False
6+
7+
print "Hex-rays version %s has been detected" % idaapi.get_hexrays_version()
8+
9+
f = idaapi.get_func(idaapi.get_screen_ea());
10+
if f is None:
11+
print "Please position the cursor within a function"
12+
return True
13+
14+
cfunc = idaapi.decompile(f);
15+
if cfunc is None:
16+
print "Failed to decompile!"
17+
return True
18+
19+
sv = cfunc.get_pseudocode();
20+
for sline in sv:
21+
print idaapi.tag_remove(sline.line);
22+
23+
return True
24+
25+
if main():
26+
idaapi.term_hexrays_plugin();

0 commit comments

Comments
 (0)