本文整理汇总了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)