Struct gdb_command::GdbCommand[][src]

pub struct GdbCommand<'a> { /* fields omitted */ }

Struct contains information about arguments for gdb to run.

Implementations

impl<'a> GdbCommand<'a>[src]

pub fn new(exec_type: &'a ExecType<'_>) -> GdbCommand<'a>[src]

Construct GdbCommand from given ExecType.

Arguments

  • type - execution type to run gdb.

pub fn ex(&mut self, cmd: &'a str) -> &'a mut GdbCommand<'_>[src]

Add new gdb command to execute.

Arguments

  • cmd - gdb command parameter (-ex).

pub fn raw(&self) -> Result<Vec<u8>>[src]

Run gdb with provided commands and return raw stdout.

pub fn bt(&mut self) -> &'a mut GdbCommand<'_>[src]

Add command to get backtrace (-ex bt)

pub fn disassembly(&mut self) -> &'a mut GdbCommand<'_>[src]

Add command to get disassembly (-ex ‘x/16i $pc’)

pub fn regs(&mut self) -> &'a mut GdbCommand<'_>[src]

Add command to get registers (-ex ‘i r’)

pub fn mappings(&mut self) -> &'a mut GdbCommand<'_>[src]

Add command to get mappings (-ex ‘info proc mappings’)

pub fn run(&self) -> Result<Vec<String>>[src]

Execute gdb and get result for each command.

Return value.

The return value is a vector of strings for each command executed.

Trait Implementations

impl<'a> Debug for GdbCommand<'a>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> RefUnwindSafe for GdbCommand<'a>

impl<'a> Send for GdbCommand<'a>

impl<'a> Sync for GdbCommand<'a>

impl<'a> Unpin for GdbCommand<'a>

impl<'a> UnwindSafe for GdbCommand<'a>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

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

Performs the conversion.

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.

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

Performs the conversion.