C and C++ Binaries

Cross-Referencing: cs_xref_common.h

Defines additional operations for cross-referencing: see also cs_xref.h.



Links


Defines

#define CS_XREF_COMMON_H

Functions

cs_const_string cs_xr_kind_name ( cs_xr_kind k )
Get the name of a cs_xr_kind.
cs_const_string cs_xr_role_name ( cs_xr_role r )
Get the name of a cs_xr_role.
cs_const_string cs_xr_kind_role_name ( cs_xr_kind_role kr )
Get the name of a cs_xr_kind_role.
csuint64 cs_xref_namehash ( cs_const_string s )
Hash a token name.
csuint64 cs_xref_namehash_unterminated ( cs_const_string s, cs_size_t len )
Hash the token name obtained by taking a specified-length initial substring of a string.
void cs_xr_kind_role_decompose ( cs_xr_kind_role kr, cs_xr_kind * k, cs_xr_role * r )
Get the cs_xr_kind and cs_xr_role corresponding to a specified cs_xr_kind_role value.
cs_xr_kind_role cs_xr_kind_role_compose ( cs_xr_kind k, cs_xr_role r )
Get the cs_xr_kind_role value corresponding to a specified cs_xr_kind, cs_xr_kind_role pair.

Function Descriptions

Function cs_xr_kind_name
cs_const_string cs_xr_kind_name (
Get the name of a cs_xr_kind.
Parameters
k [in] The cs_xr_kind for which to get the name.
Returns A cs_const_string containing the name of k. Returns NULL if k is outside the defined range of cs_xr_kind.
Function cs_xr_role_name
cs_const_string cs_xr_role_name (
Get the name of a cs_xr_role.
Parameters
r [in] The cs_xr_role for which to get the name.
Returns A cs_const_string containing the name of r. Returns NULL if r is outside the defined range of cs_xr_role.
Function cs_xr_kind_role_name
cs_const_string cs_xr_kind_role_name (
Get the name of a cs_xr_kind_role.
Parameters
kr [in] The cs_xr_kind_role for which to get the name.
Returns A cs_const_string containing the name of kr. Returns NULL if kr is outside the defined range of cs_xr_kind_role.
Function cs_xref_namehash
csuint64 cs_xref_namehash (
Hash a token name.
Parameters
s [in] The token name.
Returns A hash of s, as a csuint64
Notes A procedure name token is the procedure basename as returned by cs_pdg_basename().
Function cs_xref_namehash_unterminated
csuint64 cs_xref_namehash_unterminated (
Hash the token name obtained by taking a specified-length initial substring of a string.
Parameters
s [in] The string to operate on.
len [in] Specifies the length of the initial substring of s that is to be hashed. Should be less than or equal to the length of s.
Returns A hash of the first len characters of s.
Function cs_xr_kind_role_decompose
void cs_xr_kind_role_decompose (
Get the cs_xr_kind and cs_xr_role corresponding to a specified cs_xr_kind_role value.
Parameters
kr [in] The cs_xr_kind_role value
k [out] The cs_xr_kind corresponding to the kind component of kr.
r [out] The cs_xr_role corresponding to the role component of kr.
Returns void
Function cs_xr_kind_role_compose
cs_xr_kind_role cs_xr_kind_role_compose (
Get the cs_xr_kind_role value corresponding to a specified cs_xr_kind, cs_xr_kind_role pair.
Parameters
k [in] The kind.
r [in] The role.
Returns The cs_xr_kind_role that represents the combination of kind k and role r. Returns csxrkr_count if k and r do not represent a valid token kind/role combination.