mirror of
https://github.com/cemu-project/idapython.git
synced 2024-12-01 05:24:18 +01:00
idautils.py: CPU registers are now accessible as cpu.EAX (bot read and write). Patch by Igor Skochinsky
This commit is contained in:
parent
d3ac331e36
commit
e9f1e04519
@ -343,3 +343,16 @@ def GetInputFileMD5():
|
|||||||
@return: MD5 string or None on error
|
@return: MD5 string or None on error
|
||||||
"""
|
"""
|
||||||
return idc.GetInputMD5()
|
return idc.GetInputMD5()
|
||||||
|
|
||||||
|
|
||||||
|
class _cpu:
|
||||||
|
"Simple wrapper around GetRegValue/SetRegValue"
|
||||||
|
def __getattr__(self, name):
|
||||||
|
#print "cpu.get(%s)"%name
|
||||||
|
return idc.GetRegValue(name)
|
||||||
|
|
||||||
|
def __setattr__(self, name, value):
|
||||||
|
#print "cpu.set(%s)"%name
|
||||||
|
return idc.SetRegValue(value, name)
|
||||||
|
|
||||||
|
cpu = _cpu()
|
||||||
|
Loading…
Reference in New Issue
Block a user