pub struct ExternSymbol {
pub tid: Tid,
pub addresses: Vec<String>,
pub name: String,
pub calling_convention: Option<String>,
pub parameters: Vec<Arg>,
pub return_values: Vec<Arg>,
pub no_return: bool,
pub has_var_args: bool,
}
Expand description
An extern symbol represents a funtion that is dynamically linked from another binary.
Fields§
§tid: Tid
The term ID of the extern symbol.
addresses: Vec<String>
Addresses of possibly multiple locations of the same extern symbol
name: String
The name of the extern symbol
calling_convention: Option<String>
The calling convention used for the extern symbol if known
parameters: Vec<Arg>
Parameters of an extern symbol. May be empty if there are no parameters or the parameters are unknown.
return_values: Vec<Arg>
Return values of an extern symbol. May be empty if there is no return value or the return values are unknown.
no_return: bool
If set to true
, the function is assumed to never return to its caller when called.
has_var_args: bool
If the function has a variable number of parameters, this flag is set to true
.
Implementations§
source§impl ExternSymbol
impl ExternSymbol
sourcepub fn get_unique_return_register(&self) -> Result<&Variable, Error>
pub fn get_unique_return_register(&self) -> Result<&Variable, Error>
If the extern symbol has exactly one return value that is passed in a register, return the register.
sourcepub fn get_unique_parameter(&self) -> Result<&Arg, Error>
pub fn get_unique_parameter(&self) -> Result<&Arg, Error>
If the extern symbol has exactly one parameter, return the parameter.
sourcepub fn get_calling_convention<'a>(
&self,
project: &'a Project
) -> &'a CallingConvention
pub fn get_calling_convention<'a>( &self, project: &'a Project ) -> &'a CallingConvention
Get the calling convention corresponding to the extern symbol.
Trait Implementations§
source§impl Clone for ExternSymbol
impl Clone for ExternSymbol
source§fn clone(&self) -> ExternSymbol
fn clone(&self) -> ExternSymbol
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ExternSymbol
impl Debug for ExternSymbol
source§impl<'de> Deserialize<'de> for ExternSymbol
impl<'de> Deserialize<'de> for ExternSymbol
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for ExternSymbol
impl Display for ExternSymbol
source§impl Hash for ExternSymbol
impl Hash for ExternSymbol
source§impl PartialEq for ExternSymbol
impl PartialEq for ExternSymbol
source§fn eq(&self, other: &ExternSymbol) -> bool
fn eq(&self, other: &ExternSymbol) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ExternSymbol
impl Serialize for ExternSymbol
impl Eq for ExternSymbol
impl StructuralEq for ExternSymbol
impl StructuralPartialEq for ExternSymbol
Auto Trait Implementations§
impl RefUnwindSafe for ExternSymbol
impl Send for ExternSymbol
impl Sync for ExternSymbol
impl Unpin for ExternSymbol
impl UnwindSafe for ExternSymbol
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.