Struct idalib_sys::xref::xrefblk_t
#[repr(C)]pub struct xrefblk_t {
pub from: ea_t,
pub to: ea_t,
pub iscode: u8,
pub type_: u8,
pub user: u8,
}
Expand description
Structure to enumerate all xrefs. This structure provides a way to access cross-references from a given address. For example:
\code xrefblk_t xb; for ( bool ok=xb.first_from(ea, XREF_ALL); ok; ok=xb.next_from() ) { // xb.to - contains the referenced address } \endcode or: \code xrefblk_t xb; for ( bool ok=xb.first_to(ea, XREF_ALL); ok; ok=xb.next_to() ) { // xb.from - contains the referencing address } \endcode
First, all code references will be returned, then all data references. If you need only code references, stop calling next() as soon as you get a dref.
If you need only data references, pass #XREF_DATA flag to first(). You may not modify the contents of a xrefblk_t structure! It is read only.
Fields§
§from: ea_t
< the referencing address - filled by first_to(),next_to()
to: ea_t
< the referenced address - filled by first_from(), next_from()
iscode: u8
< 1-is code reference; 0-is data reference
type_: u8
< type of the last returned reference (::cref_t & ::dref_t)
user: u8
< 1-is user defined xref, 0-defined by ida
Implementations§
§impl xrefblk_t
impl xrefblk_t
pub unsafe fn first_from(
self: Pin<&mut Self>,
_from: c_ulonglong,
flags: c_int,
) -> bool
pub unsafe fn first_from( self: Pin<&mut Self>, _from: c_ulonglong, flags: c_int, ) -> bool
Get first xref from the given address (store in #to)