Struct xrefblk_t
#[repr(C)]pub struct xrefblk_t {
pub from: c_ulonglong,
pub to: c_ulonglong,
pub iscode: bool,
pub type_: c_uchar,
pub user: bool,
pub _flags: c_uchar,
}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_FLOW); 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_FLOW); 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: c_ulonglong< the referencing address - filled by first_to(),next_to()
to: c_ulonglong< the referenced address - filled by first_from(), next_from()
iscode: bool< is code reference (::cref_t)? < otherwise it is a data reference (::dref_t)
type_: c_uchar< type of the last returned reference (::cref_t & ::dref_t)
user: bool< is user defined xref? otherwise defined by ida
_flags: c_ucharImplementations§
§impl xrefblk_t
impl xrefblk_t
pub unsafe fn first_from_bindgen_original_bindgen_original( &mut self, _from: c_ulonglong, flags: c_int, ) -> bool
pub unsafe fn next_from_bindgen_original_bindgen_original(&mut self) -> bool
pub unsafe fn first_to_bindgen_original_bindgen_original( &mut self, _to: c_ulonglong, flags: c_int, ) -> bool
pub unsafe fn next_to_bindgen_original_bindgen_original(&mut self) -> bool
§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)
pub unsafe fn next_from(self: Pin<&mut Self>) -> bool
pub unsafe fn next_from(self: Pin<&mut Self>) -> bool
Get next xref from address provided to first_from()