mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-25 02:26:55 +01:00
69d5c83d28
- The Functions() generator function now accepts function tail start parameter - Added into idc.py: DbgRead/DbgWrite/SetTargetAssembler and stack pointer related functions - Wrapped more type info related functions
17 lines
472 B
Python
17 lines
472 B
Python
# -----------------------------------------------------------------------
|
|
# This is an example illustrating how to extend IDC from Python
|
|
# (c) Hex-Rays
|
|
#
|
|
from idaapi import set_idc_func_ex
|
|
|
|
#<pycode(ex_expr)>
|
|
def py_power(n, e):
|
|
return n ** e
|
|
|
|
ok = set_idc_func_ex("pow", py_power, (idaapi.VT_LONG, idaapi.VT_LONG), 0)
|
|
if ok:
|
|
print("Now the pow() will be present IDC!")
|
|
else:
|
|
print("Failed to register pow() IDC function")
|
|
#</pycode(ex_expr)>
|