IDA C++ SDK 9.2
Loading...
Searching...
No Matches
Local types information and manipulation helpers

Classes

struct  field_path_t
 Result of resolve_field_path(): resolved leaf info plus disambiguation context. More...

Functions

idaman bool ida_export resolve_field_path (field_path_t *out, const til_t *til, const char *dotted_path)
 Resolve a dotted field path like "Top.Field1.Field2.Leaf".
idaman tid_t ida_export get_named_type_tid (const char *name)
 Get named local type TID.
idaman bool ida_export get_tid_name (qstring *out, tid_t tid)
 Get a type name for the specified TID.
idaman uint32 ida_export get_tid_ordinal (tid_t tid)
 Get type ordinal number for TID.
idaman ssize_t ida_export get_udm_by_fullname (udm_t *udm, const char *fullname)
 Get udt member by full name.
idaman bool ida_export get_idainfo_by_udm (flags64_t *flags, opinfo_t *ti, const udm_t &udm, ea_t refinfo_ea=BADADDR)
 Calculate IDA info from udt member.
tid_t create_enum_type (const char *enum_name, enum_type_data_t &ei, int enum_width, type_sign_t sign, bool convert_to_bitmask, const char *enum_cmt=nullptr)
 Create type enum.
tid_t edm_t::get_tid () const

Detailed Description

Function Documentation

◆ resolve_field_path()

idaman bool ida_export resolve_field_path ( field_path_t * out,
const til_t * til,
const char * dotted_path )

Resolve a dotted field path like "Top.Field1.Field2.Leaf".

The first segment must be a registered TIL type name (a type, not a member). Each subsequent segment is looked up as a member in the current type. Every segment must be spelled out explicitly.

On success, out is filled with the leaf info plus the chain of union selections needed to disambiguate the path for op_stroff().

Parameters
[out]outresult; cleared on entry
tiltype library; nullptr means current idati
dotted_pathdotted field path
Returns
true on success

◆ get_named_type_tid()

idaman tid_t ida_export get_named_type_tid ( const char * name)

Get named local type TID.

Parameters
nametype name
Returns
TID or BADADDR

◆ get_tid_name()

idaman bool ida_export get_tid_name ( qstring * out,
tid_t tid )

Get a type name for the specified TID.

Parameters
tidtype TID
[out]outtype name
Returns
true if there is type with TID
Note
this function is the inverse to get_named_type_tid

◆ get_tid_ordinal()

idaman uint32 ida_export get_tid_ordinal ( tid_t tid)

Get type ordinal number for TID.

Parameters
tidtype/enum constant/udt member TID
Returns
type ordinal number or 0

◆ get_udm_by_fullname()

idaman ssize_t ida_export get_udm_by_fullname ( udm_t * udm,
const char * fullname )

Get udt member by full name.

Parameters
[out]udmmember, can be NULL
fullnameudt member name in format <udt name>.<member name>
Returns
member index into udt_type_data_t or -1

◆ get_idainfo_by_udm()

idaman bool ida_export get_idainfo_by_udm ( flags64_t * flags,
opinfo_t * ti,
const udm_t & udm,
ea_t refinfo_ea = BADADDR )

Calculate IDA info from udt member.

Parameters
flags[out]flags (see bytes.hpp) for udt member
ti[out]additional representation information, see set_opinfo()
udmudt member
refinfo_eaif specified will be used to adjust the refinfo_t data
Note
any output argument may be nullptr

◆ create_enum_type()

tid_t create_enum_type ( const char * enum_name,
enum_type_data_t & ei,
int enum_width,
type_sign_t sign,
bool convert_to_bitmask,
const char * enum_cmt = nullptr )
inline

Create type enum.

Parameters
enum_nametype name
eienum type data
enum_widththe width of an enum element allowed values: 0 (unspecified),1,2,4,8,16,32,64
signenum sign
convert_to_bitmasktry convert enum to bitmask enum
enum_cmtenum type comment
Returns
enum TID

◆ get_tid()

tid_t edm_t::get_tid ( ) const
inline