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

pub unsafe fn new() -> impl New<Output = Self>

Synthesized default constructor.

§

impl xrefblk_t

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)

§

impl xrefblk_t

pub unsafe fn first_to( self: Pin<&mut Self>, _to: c_ulonglong, flags: c_int, ) -> bool

Get xref to given address (store in #from)

Trait Implementations§

§

impl CopyNew for xrefblk_t

§

unsafe fn copy_new(other: &xrefblk_t, this: Pin<&mut MaybeUninit<xrefblk_t>>)

Synthesized copy constructor.

§

impl Drop for xrefblk_t

§

fn drop(self: &mut xrefblk_t)

Synthesized destructor.

§

impl ExternType for xrefblk_t

§

type Id = (x, r, e, f, b, l, k, __, t)

A type-level representation of the type’s C++ namespace and type name. Read more
§

type Kind = Trivial

§

impl MakeCppStorage for xrefblk_t

§

unsafe fn allocate_uninitialized_cpp_storage() -> *mut xrefblk_t

Allocates heap space for this type in C++ and return a pointer to that space, but do not initialize that space (i.e. do not yet call a constructor). Read more
§

unsafe fn free_uninitialized_cpp_storage(arg0: *mut xrefblk_t)

Frees a C++ allocation which has not yet had a constructor called. Read more
§

impl MoveNew for xrefblk_t

§

unsafe fn move_new( other: Pin<MoveRef<'_, xrefblk_t>>, this: Pin<&mut MaybeUninit<xrefblk_t>>, )

Synthesized move constructor.

§

impl SharedPtrTarget for xrefblk_t

§

impl UniquePtrTarget for xrefblk_t

§

impl VectorElement for xrefblk_t

§

impl WeakPtrTarget for xrefblk_t

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithinBoxTrivial for T
where T: ExternType<Kind = Trivial> + Unpin,

§

fn within_box(self) -> Pin<Box<T>>

§

impl<T> WithinUniquePtrTrivial for T
where T: UniquePtrTarget + ExternType<Kind = Trivial> + Unpin,