Struct cinsn_t
pub struct cinsn_t { /* private fields */ }Expand description
Ctree item: statement. Depending on the exact statement type, various fields of the union are used.
Implementations§
§impl cinsn_t
impl cinsn_t
pub unsafe fn new_insn<'a>(
self: Pin<&'a mut Self>,
insn_ea: c_ulonglong,
) -> Pin<&'a mut cinsn_t>
pub unsafe fn new_insn<'a>( self: Pin<&'a mut Self>, insn_ea: c_ulonglong, ) -> Pin<&'a mut cinsn_t>
Create a new statement. The current statement must be a block. The new statement will be appended to it. \param insn_ea statement address
pub unsafe fn create_if<'a>(
self: Pin<&'a mut Self>,
cnd: *mut cexpr_t,
) -> Pin<&'a mut cif_t>
pub unsafe fn create_if<'a>( self: Pin<&'a mut Self>, cnd: *mut cexpr_t, ) -> Pin<&'a mut cif_t>
Create a new if-statement. The current statement must be a block. The new statement will be appended to it. \param cnd if condition. It will be deleted after being copied.
pub unsafe fn is_ordinary_flow(&self) -> bool
pub unsafe fn is_ordinary_flow(&self) -> bool
Check if the statement passes execution to the next statement. \return false if the statement breaks the control flow (like goto, return, etc)
pub unsafe fn collect_free_breaks(
self: Pin<&mut Self>,
breaks: *mut qvector_cinsn_t_AutocxxConcrete,
) -> bool
pub unsafe fn collect_free_breaks( self: Pin<&mut Self>, breaks: *mut qvector_cinsn_t_AutocxxConcrete, ) -> bool
Collect free \c break statements. This function finds all free \c break statements within the current statement. A \c break statement is free if it does not have a loop or switch parent that that is also within the current statement. \param breaks pointer to the variable where the vector of all found free \c break statements is returned. This argument can be nullptr. \return true if some free \c break statements have been found
pub unsafe fn collect_free_continues(
self: Pin<&mut Self>,
continues: *mut qvector_cinsn_t_AutocxxConcrete,
) -> bool
pub unsafe fn collect_free_continues( self: Pin<&mut Self>, continues: *mut qvector_cinsn_t_AutocxxConcrete, ) -> bool
Collect free \c continue statements. This function finds all free \c continue statements within the current statement. A \c continue statement is free if it does not have a loop parent that that is also within the current statement. \param continues pointer to the variable where the vector of all found free \c continue statements is returned. This argument can be nullptr. \return true if some free \c continue statements have been found
pub unsafe fn contains_free_break(&self) -> bool
pub unsafe fn contains_free_break(&self) -> bool
Check if the statement has free \c break statements.
pub unsafe fn contains_free_continue(&self) -> bool
pub unsafe fn contains_free_continue(&self) -> bool
Check if the statement has free \c continue statements.
§impl cinsn_t
impl cinsn_t
pub unsafe fn swap(self: Pin<&mut cinsn_t>, r: Pin<&mut cinsn_t>)
pub unsafe fn compare(self: &cinsn_t, r: &cinsn_t) -> c_int
pub unsafe fn replace_by(self: Pin<&mut cinsn_t>, r: *mut cinsn_t)
pub unsafe fn replace_by(self: Pin<&mut cinsn_t>, r: *mut cinsn_t)
Replace the statement. The children of the statement are abandoned (not freed). The statement pointed by ‘r’ is moved to ‘this’ statement \param r the source statement. It is deleted after being copied
pub unsafe fn cleanup(self: Pin<&mut cinsn_t>)
pub unsafe fn cleanup(self: Pin<&mut cinsn_t>)
Cleanup the statement. This function properly deletes all children and sets the item type to cit_empty.
pub unsafe fn zero(self: Pin<&mut cinsn_t>)
pub unsafe fn zero(self: Pin<&mut cinsn_t>)
Overwrite with zeroes without cleaning memory or deleting children
pub unsafe fn print(
self: &cinsn_t,
indent: c_int,
vp: Pin<&mut vc_printer_t>,
use_curly: use_curly_t,
)
pub unsafe fn print( self: &cinsn_t, indent: c_int, vp: Pin<&mut vc_printer_t>, use_curly: use_curly_t, )
Print the statement into many lines. \param indent indention (number of spaces) for the statement \param vp printer helper class which will receive the generated text. \param use_curly if the statement is a block, how should curly braces be printed.
pub unsafe fn print1(
self: &cinsn_t,
vout: *mut qstring_char_AutocxxConcrete,
func: *const cfunc_t,
)
pub unsafe fn print1( self: &cinsn_t, vout: *mut qstring_char_AutocxxConcrete, func: *const cfunc_t, )
Print the statement into one line. Currently this function is not available. \param vout output buffer \param func parent function. This argument is used to find out the referenced variable names.
pub unsafe fn contains_insn(
self: &cinsn_t,
type_: ctype_t,
times: c_int,
) -> bool
pub unsafe fn contains_insn( self: &cinsn_t, type_: ctype_t, times: c_int, ) -> bool
Check if the statement contains a statement of the specified type. \param type statement opcode to look for \param times how many times TYPE should be present \return true if the statement has at least TIMES children with opcode == TYPE