- added GetInstructionList() and GetRegisterList() to idautils.py

- ignored processor_t and ph global variable
This commit is contained in:
elias.bachaalany
2010-03-22 14:21:43 +00:00
parent 729084a1ff
commit ab81000187
3 changed files with 62 additions and 44 deletions

View File

@@ -451,6 +451,13 @@ class Strings(object):
return Strings.StringItem(self._si)
return None
def GetRegisterList():
"""Returns the register list"""
return idaapi.ph_get_regnames()
def GetInstructionList():
"""Returns the instruction list of the current processor module"""
return [i[0] for i in idaapi.ph_get_instruc() if i[0]]
def _Assemble(ea, line):
"""

View File

@@ -805,7 +805,7 @@ def MakePackReal(ea):
@return: 1-ok, 0-failure
"""
return idaapi.doPackReal(ea, idaapi.cvar.ph.tbyte_size)
return idaapi.doPackReal(ea, idaapi.ph_get_tbyte_size())
def MakeTbyte(ea):
@@ -816,7 +816,7 @@ def MakeTbyte(ea):
@return: 1-ok, 0-failure
"""
return idaapi.doTbyt(ea, idaapi.cvar.ph.tbyte_size)
return idaapi.doTbyt(ea, idaapi.ph_get_tbyte_size())
def MakeStructEx(ea, size, strname):
@@ -2352,13 +2352,13 @@ def ChangeConfig(directive):
@note: If the directives are erroneous, a fatal error will be generated.
The changes will be effective only for the current session.
"""
return Eval('ChangeConfig("%s")'%directive)
return Eval('ChangeConfig("%s")' % directive)
# The following functions allow you to set/get common parameters.
# Please note that not all parameters can be set directly.
def GetLongPrm (offset):
def GetLongPrm(offset):
"""
"""
val = _IDC_GetAttr(idaapi.cvar.inf, _INFMAP, offset)