Module ida_name
A non-tail address of the program may have a name. Tail addresses (i.e. the addresses in the middle of an instruction or data item) cannot have names.
Global Variables
CN_KEEP_TRAILING__DIGITS
DEBNAME_EXACT
DEBNAME_LOWER
DEBNAME_NICE
DEBNAME_UPPER
DQT_COMPILER
DQT_FULL
DQT_NAME_TYPE
DQT_NPURGED_2
DQT_NPURGED_4
DQT_NPURGED_8
FUNC_IMPORT_PREFIX
GETN_APPZERO
GETN_NODUMMY
GETN_NOFIXUP
GNCN_NOCOLOR
GNCN_NODBGNM
GNCN_NOFUNC
GNCN_NOLABEL
GNCN_NOSEG
GNCN_PREFDBG
GNCN_REQFUNC
GNCN_REQNAME
GNCN_SEGNUM
GNCN_SEG_FUNC
GN_COLORED
GN_DEMANGLED
GN_ISRET
GN_LOCAL
GN_LONG
GN_NOT_DUMMY
GN_NOT_ISRET
GN_SHORT
GN_STRICT
GN_VISIBLE
MANGLED_CODE
MANGLED_DATA
MANGLED_UNKNOWN
MAXNAMELEN
ME_ERRAUTO
ME_FRAME
ME_ILLSTR
ME_INTERR
ME_NOCOMP
ME_NOERROR_LIMIT
ME_NOHASHMEM
ME_NOSTRMEM
ME_PARAMERR
ME_SMALLANS
MNG_CALC_VALID
MNG_COMPILER_MSK
MNG_DEFFAR
MNG_DEFHUGE
MNG_DEFNEAR
MNG_DEFNEARANY
MNG_DEFNONE
MNG_DEFPTR64
MNG_DROP_IMP
MNG_IGN_ANYWAY
MNG_IGN_JMP
MNG_LONG_FORM
MNG_MOVE_JMP
MNG_NOBASEDT
MNG_NOCALLC
MNG_NOCLOSUR
MNG_NOCSVOL
MNG_NODEFINIT
MNG_NOECSU
MNG_NOMANAGE
MNG_NOMODULE
MNG_NOPOSTFC
MNG_NOPTRTYP
MNG_NOPTRTYP16
MNG_NORETTYPE
MNG_NOSCTYP
MNG_NOSTVIR
MNG_NOTHROW
MNG_NOTYPE
MNG_NOUNALG
MNG_NOUNDERSCORE
MNG_PTRMSK
MNG_SHORT_FORM
MNG_SHORT_S
MNG_SHORT_U
MNG_ZPT_SPACE
MT_BORLAN
MT_CASTING
MT_CDECL
MT_CLRCALL
MT_CLRCDTOR
MT_CONSTR
MT_DEFAULT
MT_DESTR
MT_DMDCALL
MT_FASTCALL
MT_FORTRAN
MT_GCC3
MT_GNU
MT_INTERRUPT
MT_LOCALNAME
MT_MEMBER
MT_MSCOMP
MT_MSFASTCALL
MT_OPERAT
MT_OTHER
MT_PARMAX
MT_PARSHF
MT_PASCAL
MT_PRIVATE
MT_PROTECT
MT_PUBLIC
MT_REGCALL
MT_RTTI
MT_STDCALL
MT_SYSCALL
MT_THISCALL
MT_VECTORCALL
MT_VISAGE
MT_VOIDARG
MT_VTABLE
MT_WATCOM
M_ANONNSP
M_AUTOCRT
M_CLASS
M_COMPILER
M_DBGNAME
M_ELLIPSIS
M_PARMSK
M_PRCMSK
M_SAVEREGS
M_STATIC
M_THUNK
M_TMPLNAM
M_TRUNCATE
M_TYPMASK
M_VIRTUAL
NT_ABS
NT_BMASK
NT_BYTE
NT_ENUM
NT_LOCAL
NT_NONE
NT_REGVAR
NT_SEG
NT_STKVAR
NT_STROFF
SN_AUTO
SN_CHECK
SN_DELTAIL
SN_FORCE
SN_IDBENC
SN_LOCAL
SN_NOCHECK
SN_NODUMMY
SN_NOLIST
SN_NON_AUTO
SN_NON_PUBLIC
SN_NON_WEAK
SN_NOWARN
SN_PUBLIC
SN_WEAK
UCDR_MANGLED
UCDR_NAME
UCDR_STRLIT
UCDR_TYPE
VNT_IDENT
VNT_STRLIT
VNT_TYPE
VNT_UDTMEM
VNT_VISIBLE
ignore_glabel
ignore_llabel
ignore_none
ignore_regvar
ignore_stkvar
Functions
append_struct_fields(disp: adiff_t *, n: int, path: tid_t const *, flags: flags64_t, delta: adiff_t, appzero: bool) ‑> qstring *, adiff_t *
append_struct_fields(disp, n, path, flags, delta, appzero) -> str Append names of struct fields to a name if the name is a struct name.
calc_gtn_flags(fromaddr, ea)
Calculate flags for get_ea_name() function
cleanup_name(ea: ea_t, name: char const *, flags: uint32 = 0) ‑> qstring *
cleanup_name(ea, name, flags=0) -> bool
del_debug_names(ea1: ea_t, ea2: ea_t) ‑> void
del_debug_names(ea1, ea2)
del_global_name(ea: ea_t) ‑> bool
del_global_name(ea) -> bool
del_local_name(ea: ea_t) ‑> bool
del_local_name(ea) -> bool
demangle_name(name: char const *, disable_mask: uint32, demreq: demreq_type_t = 2) ‑> qstring *
demangle_name(name, disable_mask, demreq=DQT_FULL) -> int32 Demangle a name.
extract_name(line: char const *, x: int) ‑> qstring *
extract_name(line, x) -> str Extract a name or address from the specified string.
force_name(ea: ea_t, name: char const *, flags: int = 0) ‑> bool
force_name(ea, name, flags=0) -> bool
get_colored_demangled_name(ea: ea_t, inhibitor: int32, demform: int, gtn_flags: int = 0) ‑> qstring
get_colored_demangled_name(ea, inhibitor, demform, gtn_flags=0) -> qstring
get_colored_long_name(ea: ea_t, gtn_flags: int = 0) ‑> qstring
get_colored_long_name(ea, gtn_flags=0) -> qstring
get_colored_name(ea: ea_t) ‑> qstring
get_colored_name(ea) -> qstring
get_colored_short_name(ea: ea_t, gtn_flags: int = 0) ‑> qstring
get_colored_short_name(ea, gtn_flags=0) -> qstring
get_cp_validity(*args) ‑> bool
get_cp_validity(kind, cp, endcp=wchar32_t(-1)) -> bool Is the given codepoint (or range) acceptable in the given context? If 'endcp' is not BADCP, it is considered to be the end of the range: [cp, endcp), and is not included in the range
get_debug_name(ea_ptr: ea_t *, how: debug_name_how_t) ‑> qstring *
get_debug_name(ea_ptr, how) -> str
get_debug_name_ea(name: char const *) ‑> ea_t
get_debug_name_ea(name) -> ea_t
get_debug_names(*args) ‑> PyObject *
get_debug_names(names, ea1, ea2)
get_debug_names(ea1, ea2, return_list=False) -> PyObject
get_demangled_name(ea: ea_t, inhibitor: int32, demform: int, gtn_flags: int = 0) ‑> qstring
get_demangled_name(ea, inhibitor, demform, gtn_flags=0) -> qstring
get_ea_name(ea: ea_t, gtn_flags: int = 0) ‑> qstring
get_ea_name(ea, gtn_flags=0) -> qstring Get name at the specified address.
get_long_name(ea: ea_t, gtn_flags: int = 0) ‑> qstring
get_long_name(ea, gtn_flags=0) -> qstring
get_mangled_name_type(name: char const *) ‑> mangled_name_type_t
get_mangled_name_type(name) -> mangled_name_type_t
get_name(ea: ea_t) ‑> qstring
get_name(ea) -> qstring
get_name_base_ea(_from: ea_t, to: ea_t) ‑> ea_t
get_name_base_ea(_from, to) -> ea_t Get address of the name used in the expression for the address
get_name_color(_from: ea_t, ea: ea_t) ‑> color_t
get_name_color(_from, ea) -> color_t Calculate flags for get_ea_name() function.
Get name color.
get_name_ea(_from: ea_t, name: char const *) ‑> ea_t
get_name_ea(_from, name) -> ea_t Get the address of a name. This function resolves a name into an address. It can handle regular global and local names, as well as debugger names.
get_name_expr(_from: ea_t, n: int, ea: ea_t, off: uval_t, flags: int = 1) ‑> qstring *
get_name_expr(_from, n, ea, off, flags=0x0001) -> ssize_t Convert address to name expression (name with a displacement). This function takes into account fixup information and returns a colored name expression (in the form +/- ). It also knows about structure members and arrays. If the specified address doesn't have a name, a dummy name is generated.
get_name_value(_from: ea_t, name: char const *) ‑> uval_t *
get_name_value(_from, name) -> int Get value of the name. This function knows about: regular names, enums, special segments, etc.
get_nice_colored_name(ea: ea_t, flags: int = 0) ‑> qstring *
get_nice_colored_name(ea, flags=0) -> ssize_t Get a nice colored name at the specified address. Ex:
segment:sub+offset
segment:sub:local_label
segment:label
segment:address
segment:address+offset
get_nlist_ea(idx: size_t) ‑> ea_t
get_nlist_ea(idx) -> ea_t Get address from the list at 'idx'.
get_nlist_idx(ea: ea_t) ‑> size_t
get_nlist_idx(ea) -> size_t Get index of the name in the list @warning: returns the closest match. may return idx >= size.
get_nlist_name(idx: size_t) ‑> char const *
get_nlist_name(idx) -> char const * Get name using idx.
get_nlist_size() ‑> size_t
get_nlist_size() -> size_t Get number of names in the list.
get_short_name(ea: ea_t, gtn_flags: int = 0) ‑> qstring
get_short_name(ea, gtn_flags=0) -> qstring
get_visible_name(ea: ea_t, gtn_flags: int = 0) ‑> qstring
get_visible_name(ea, gtn_flags=0) -> qstring
hide_name(ea: ea_t) ‑> void
hide_name(ea) Remove name from the list of names
is_ident(name: char const *) ‑> bool
is_ident(name) -> bool Is a valid name? (including ::MangleChars)
is_ident_cp(cp: wchar32_t) ‑> bool
is_ident_cp(cp) -> bool Can a character appear in a name? (present in ::NameChars or ::MangleChars)
is_in_nlist(ea: ea_t) ‑> bool
is_in_nlist(ea) -> bool Is the name included into the name list?
is_name_defined_locally(*args) ‑> bool
is_name_defined_locally(pfn, name, ignore_name_def, ea1=BADADDR, ea2=BADADDR) -> bool Is the name defined locally in the specified function?
is_public_name(ea: ea_t) ‑> bool
is_public_name(ea) -> bool
is_strlit_cp(cp: wchar32_t, specific_ranges: rangeset_crefvec_t const * = None) ‑> bool
is_strlit_cp(cp, specific_ranges=None) -> bool Can a character appear in a string literal (present in ::StrlitChars) If 'specific_ranges' are specified, those will be used instead of the ones corresponding to the current culture (only if ::StrlitChars is configured to use the current culture)
is_uname(name: char const *) ‑> bool
is_uname(name) -> bool Is valid user-specified name? (valid name & !dummy prefix).
is_valid_cp(cp: wchar32_t, kind: nametype_t, data: void * = None) ‑> bool
is_valid_cp(cp, kind, data=None) -> bool Is the given codepoint acceptable in the given context?
is_valid_name(name: char const *, cpuregs_permitted: bool) ‑> bool
is_valid_name(name, cpuregs_permitted) -> bool
is_valid_typename(name: char const *) ‑> bool
is_valid_typename(name) -> bool Is valid type name?
is_visible_cp(cp: wchar32_t) ‑> bool
is_visible_cp(cp) -> bool Can a character be displayed in a name? (present in ::NameChars)
is_weak_name(ea: ea_t) ‑> bool
is_weak_name(ea) -> bool
make_name_auto(ea: ea_t) ‑> bool
make_name_auto(ea) -> bool
make_name_non_public(ea: ea_t) ‑> void
make_name_non_public(ea)
make_name_non_weak(ea: ea_t) ‑> void
make_name_non_weak(ea)
make_name_public(ea: ea_t) ‑> void
make_name_public(ea)
make_name_user(ea: ea_t) ‑> bool
make_name_user(ea) -> bool
make_name_weak(ea: ea_t) ‑> void
make_name_weak(ea)
rebuild_nlist() ‑> void
rebuild_nlist() Rebuild the name list.
reorder_dummy_names() ‑> void
reorder_dummy_names() Renumber dummy names.
set_cp_validity(*args) ‑> void
set_cp_validity(kind, cp, endcp=wchar32_t(-1), valid=True) Mark the given codepoint (or range) as acceptable or unacceptable in the given context If 'endcp' is not BADCP, it is considered to be the end of the range: [cp, endcp), and is not included in the range
set_debug_name(ea: ea_t, name: char const *) ‑> bool
set_debug_name(ea, name) -> bool
set_dummy_name(_from: ea_t, ea: ea_t) ‑> bool
set_dummy_name(from, ea) -> bool Give an autogenerated (dummy) name. Autogenerated names have special prefixes (loc...).
set_name(ea: ea_t, name: char const *, flags: int = 0) ‑> bool
set_name(ea, name, flags=0) -> bool Set or delete name of an item at the specified address. An item can be anything: instruction, function, data byte, word, string, structure, etc... Include name into the list of names.
nullptr: do nothing (return 0).
"" : delete name.
otherwise this is a new name. flags: (C++: int) Set name flags. If a bit is not specified, then the corresponding action is not performed and the name will retain the same bits as before calling this function. For new names, default is: non- public, non-weak, non-auto. retval 1: ok, name is changed retval 0: failure, a warning is displayed
show_name(ea: ea_t) ‑> void
show_name(ea) Insert name to the list of names.
validate_name(name: char const *, type: nametype_t, flags: int = 1) ‑> PyObject *
validate_name(name, type, flags=0x01) -> PyObject Validate a name. If SN_NOCHECK is specified, this function replaces all invalid characters in the name with SUBSTCHAR. However, it will return false if name is valid but not allowed to be an identifier (is a register name).
Classes
NearestName(ea_names)
: Utility class to help find the nearest name in a given ea/name dictionary
Methods
find(self, ea) Returns a tupple (ea, name, pos) that is the nearest to the passed ea If no name is matched then None is returned
update(self, ea_names) Updates the ea/names map
ea_name_t(*args)
: Proxy of C++ ea_name_t class.
Instance variables
ea: ea_t
ea
name: qstring
name
ea_name_vec_t(*args)
: Proxy of C++ qvector< ea_name_t > class.
Methods
at(self, _idx: size_t) ‑> ea_name_t const & at(self, _idx) -> ea_name_t
_idx: size_t
back(self)
begin(self, *args) ‑> qvector< ea_name_t >::const_iterator begin(self) -> ea_name_t
capacity(self) ‑> size_t capacity(self) -> size_t
clear(self) ‑> void clear(self)
empty(self) ‑> bool empty(self) -> bool
end(self, *args) ‑> qvector< ea_name_t >::const_iterator end(self) -> ea_name_t
erase(self, *args) ‑> qvector< ea_name_t >::iterator erase(self, it) -> ea_name_t
it: qvector< ea_name_t >::iterator
erase(self, first, last) -> ea_name_t
first: qvector< ea_name_t >::iterator last: qvector< ea_name_t >::iterator
extract(self) ‑> ea_name_t * extract(self) -> ea_name_t
front(self)
grow(self, *args) ‑> void grow(self, x=ea_name_t())
x: ea_name_t const &
inject(self, s: ea_name_t, len: size_t) ‑> void inject(self, s, len)
s: ea_name_t * len: size_t
insert(self, it: ea_name_t, x: ea_name_t) ‑> qvector< ea_name_t >::iterator insert(self, it, x) -> ea_name_t
it: qvector< ea_name_t >::iterator x: ea_name_t const &
pop_back(self) ‑> void pop_back(self)
push_back(self, *args) ‑> ea_name_t & push_back(self, x)
x: ea_name_t const &
push_back(self) -> ea_name_t
qclear(self) ‑> void qclear(self)
reserve(self, cnt: size_t) ‑> void reserve(self, cnt)
cnt: size_t
resize(self, *args) ‑> void resize(self, _newsize, x)
_newsize: size_t x: ea_name_t const &
resize(self, _newsize)
_newsize: size_t
size(self) ‑> size_t size(self) -> size_t
swap(self, r: ea_name_vec_t) ‑> void swap(self, r)
r: qvector< ea_name_t > &
truncate(self) ‑> void truncate(self)
Last updated