#NEWLINE# def get_offset_name( ea ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# func = get_func ( ea ) #NEWLINE# name = idc . GetTrueName ( ea_text . startEA ) #NEWLINE# name = demangle ( name , 96 ) #NEWLINE# if name : #NEWLINE# #INDENT# offset = ( ea - func . startEA ) #NEWLINE# if offset : #NEWLINE# #INDENT# return '{}+{:X}' . format ( name , offset ) #NEWLINE# #UNINDENT# return name #NEWLINE# #UNINDENT# #UNINDENT# except exceptions . SarkNoFunction : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# segment = idaapi . getseg ( ea ) #NEWLINE# name = idaapi . get_true_segm_name ( segment ) #NEWLINE# offset_format = '{{:0{}X}}' . format ( ( get_native_size ( ) * 2 ) ) #NEWLINE# ea_text = offset_format . format ( ea ) #NEWLINE# if name : #NEWLINE# #INDENT# return '{}:{}' . format ( name , ea_text ) #NEWLINE# #UNINDENT# return ea_text