mirror of
https://github.com/cemu-project/idapython.git
synced 2026-01-31 01:15:17 +01:00
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.
This commit is contained in:
@@ -481,6 +481,12 @@ def SaveBase(idbname, flags=0):
|
||||
|
||||
DBFL_BAK = idaapi.DBFL_BAK # for compatiblity with older versions, eventually delete this
|
||||
|
||||
def ValidateNames():
|
||||
"""
|
||||
check consistency of IDB name records
|
||||
@return: number of inconsistent name records
|
||||
"""
|
||||
return idaapi.validate_idb_names()
|
||||
|
||||
def Exit(code):
|
||||
"""
|
||||
@@ -2245,8 +2251,12 @@ def GetOpnd(ea, n):
|
||||
0 - the first operand
|
||||
1 - the second operand
|
||||
|
||||
@return: the current text representation of operand
|
||||
@return: the current text representation of operand or ""
|
||||
"""
|
||||
|
||||
if not isCode(idaapi.get_flags_novalue(ea)):
|
||||
return ""
|
||||
|
||||
res = idaapi.ua_outop2(ea, n)
|
||||
|
||||
if not res:
|
||||
@@ -6931,7 +6941,10 @@ def SetType(ea, newtype):
|
||||
@return: 1-ok, 0-failed.
|
||||
"""
|
||||
if newtype is not '':
|
||||
pt = ParseType(newtype, 0)[1:]
|
||||
pt = ParseType(newtype, 0)
|
||||
if pt is None:
|
||||
# parsing failed
|
||||
return None
|
||||
else:
|
||||
pt = None
|
||||
return ApplyType(ea, pt, TINFO_DEFINITE)
|
||||
@@ -8132,6 +8145,13 @@ def CheckTraceFile(filename):
|
||||
"""
|
||||
return idaapi.is_valid_trace_file(filename)
|
||||
|
||||
def DiffTraceFile(filename):
|
||||
"""
|
||||
Diff current trace buffer against given trace
|
||||
@param filename: trace file
|
||||
"""
|
||||
return idaapi.diff_trace_file(filename)
|
||||
|
||||
def ClearTraceFile(filename):
|
||||
"""
|
||||
Clear the current trace buffer
|
||||
|
||||
Reference in New Issue
Block a user