Trait libafl_cc::ToolWrapper

source ·
pub trait ToolWrapper {
Show 13 methods // Required methods fn parse_args<S>(&mut self, args: &[S]) -> Result<&mut Self, Error> where S: AsRef<str>; fn add_arg<S>(&mut self, arg: S) -> &mut Self where S: AsRef<str>; fn add_configuration(&mut self, configuration: Configuration) -> &mut Self; fn command(&mut self) -> Result<Vec<String>, Error>; fn command_for_configuration( &mut self, configuration: Configuration, ) -> Result<Vec<String>, Error>; fn configurations(&self) -> Result<Vec<Configuration>, Error>; fn ignore_configurations(&self) -> Result<bool, Error>; fn is_linking(&self) -> bool; fn silence(&mut self, value: bool) -> &mut Self; fn is_silent(&self) -> bool; // Provided methods fn add_args<S>(&mut self, args: &[S]) -> &mut Self where S: AsRef<str> { ... } fn filter(&self, _args: &mut Vec<String>) { ... } fn run(&mut self) -> Result<Option<i32>, Error> { ... }
}
Expand description

Wrap a tool hijacking its arguments

Required Methods§

source

fn parse_args<S>(&mut self, args: &[S]) -> Result<&mut Self, Error>
where S: AsRef<str>,

Set the wrapper arguments parsing a command line set of arguments

source

fn add_arg<S>(&mut self, arg: S) -> &mut Self
where S: AsRef<str>,

Add an argument

source

fn add_configuration(&mut self, configuration: Configuration) -> &mut Self

Add a Configuration

source

fn command(&mut self) -> Result<Vec<String>, Error>

Command to run the compiler

source

fn command_for_configuration( &mut self, configuration: Configuration, ) -> Result<Vec<String>, Error>

Command to run the compiler for a given Configuration

source

fn configurations(&self) -> Result<Vec<Configuration>, Error>

Get the list of requested Configurations

source

fn ignore_configurations(&self) -> Result<bool, Error>

Whether to ignore the configured Configurations. Useful for e.g. nested calls to libafl_cc from libafl_libtool.

source

fn is_linking(&self) -> bool

Get if in linking mode

source

fn silence(&mut self, value: bool) -> &mut Self

Silences libafl_cc output

source

fn is_silent(&self) -> bool

Returns true if silence was called with true

Provided Methods§

source

fn add_args<S>(&mut self, args: &[S]) -> &mut Self
where S: AsRef<str>,

Add arguments

source

fn filter(&self, _args: &mut Vec<String>)

Filter out argumets

source

fn run(&mut self) -> Result<Option<i32>, Error>

Run the tool

Object Safety§

This trait is not object safe.

Implementors§