[][src]Struct panda::Panda

pub struct Panda { /* fields omitted */ }

Builder for creating PANDA instances. Only for use in libpanda mode.

Implementations

impl Panda[src]

pub fn new() -> Self[src]

Create a new PANDA instance.

Example

Panda::new()
    .generic("x86_64")
    .run();

pub fn arg<S: Into<String>>(&mut self, arg: S) -> &mut Self[src]

Add an argument for PANDA

Example

Panda::new()
    .arg("-nomonitor")
    .run();

pub fn args<I, S>(&mut self, args: I) -> &mut Self where
    I: IntoIterator<Item = S>,
    S: Into<String>, 
[src]

Add a set of extra arguments for PANDA

Example

Panda::new()
    .args(&["-panda", "callstack_instr"])
    .run();

pub fn arch(&mut self, arch: Arch) -> &mut Self[src]

Sets the architecture of the guest

Example

Panda::new()
    .arch(Arch::i386)
    .run();

pub fn enable_graphics(&mut self) -> &mut Self[src]

Example

Panda::new()
    .enable_graphics()
    .run();

pub fn expect_prompt<S: Into<String>>(&mut self, prompt_regex: S) -> &mut Self[src]

Regular expression describing the prompt exposed by the guest on a serial console. Used in order to know when running a command has finished with its output.

pub fn mem<S: Into<String>>(&mut self, mem: S) -> &mut Self[src]

Set the available memory. If restoring from a snapshot or viewing a replay, this must be the same as when the replay/snapshot was taken.

pub fn generic<S: Into<String>>(&mut self, generic: S) -> &mut Self[src]

Use generic PANDA Qcow for run

Example

Panda::new()
    .generic("x86_64")
    .run();

pub fn replay<S: Into<String>>(&mut self, replay: S) -> &mut Self[src]

Run the given replay in the PANDA instance. Equivalent to -replay [name] from the PANDA command line.

Example

Panda::new()
    .replay("grep_recording")
    .run();

pub fn plugin_args<T: PandaArgs>(&mut self, args: &T) -> &mut Self[src]

Load a plugin with args provided by a PandaArgs struct.

Example

use panda::prelude::*;

#[derive(PandaArgs)]
#[name = "stringsearch"]
struct StringSearch {
    str: String
}
 
fn main() {
    Panda::new()
        .generic("x86_64")
        .replay("test")
        .plugin_args(&StringSearch {
            str: "test".into()
        })
        .run();
}

pub fn run(&mut self)[src]

Start the PANDA instance with the given settings. This is a blocking operation.

Example

Panda::new()
    .generic("x86_64")
    .run();

Trait Implementations

impl Default for Panda[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.