本文整理匯總了Python中ida_name.set_name方法的典型用法代碼示例。如果您正苦於以下問題:Python ida_name.set_name方法的具體用法?Python ida_name.set_name怎麽用?Python ida_name.set_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ida_name
的用法示例。
在下文中一共展示了ida_name.set_name方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: getProc_addr
# 需要導入模塊: import ida_name [as 別名]
# 或者: from ida_name import set_name [as 別名]
def getProc_addr(idx, ctx):
import ida_bytes
obj = ctx.get_obj("fcnPtr")
print "%x" % obj.addr
name = ctx.get_obj("fcnName")
name_str = ida_bytes.get_strlit_contents(name.addr, -1, -1)
ida_name.set_name(obj.addr, name_str)
return False
#========================================
# This pattern will replace code like that
# struct_XXX.field_X = (anytype)sub_XXXX
# struct_XXX.field_Y = (anytype)sub_YYYY
# by
# struct_XXX.sub_XXXX = (anytype)sub_XXXX
# struct_XXX.sub_YYYY = (anytype)sub_YYYY
# where struct_XXX - global variable
# So, it's just renames structure fields
#========================================
示例2: __call__
# 需要導入模塊: import ida_name [as 別名]
# 或者: from ida_name import set_name [as 別名]
def __call__(self):
flags = ida_name.SN_LOCAL if self.local_name else 0
ida_name.set_name(
self.ea, Event.encode(self.new_name), flags | ida_name.SN_NOWARN
)
ida_kernwin.request_refresh(ida_kernwin.IWID_DISASMS)
HexRaysEvent.refresh_pseudocode_view(self.ea)
示例3: apply
# 需要導入模塊: import ida_name [as 別名]
# 或者: from ida_name import set_name [as 別名]
def apply(self, data):
name = str(data['name'])
# TODO: flags should be abstructed away from thier enum values to support
# changes between versions
flags = data['flags']
ida_name.set_name(self.offset, name, flags)