mirror of
https://github.com/idapython/src
synced 2026-06-08 14:47:00 +00:00
idautils.py: CPU registers are now accessible as cpu.EAX (bot read and write). Patch by Igor Skochinsky
This commit is contained in:
@@ -343,3 +343,16 @@ def GetInputFileMD5():
|
||||
@return: MD5 string or None on error
|
||||
"""
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user