pub struct GdbCommand<'a> { /* private fields */ }
Expand description
Struct contains information about arguments for gdb
to run.
Implementations§
Source§impl<'a> GdbCommand<'a>
impl<'a> GdbCommand<'a>
Sourcepub fn new(exec_type: &'a ExecType<'_>) -> GdbCommand<'a>
pub fn new(exec_type: &'a ExecType<'_>) -> GdbCommand<'a>
Sourcepub fn stdin<T: Into<Option<&'a PathBuf>>>(
&mut self,
file: T,
) -> &'a mut GdbCommand<'_>
pub fn stdin<T: Into<Option<&'a PathBuf>>>( &mut self, file: T, ) -> &'a mut GdbCommand<'_>
Add stdin for executable.
You should call this method before using r
method.
§Arguments
file
- path to stdin file
Sourcepub fn ex<T: Into<String>>(&mut self, cmd: T) -> &'a mut GdbCommand<'_>
pub fn ex<T: Into<String>>(&mut self, cmd: T) -> &'a mut GdbCommand<'_>
Sourcepub fn r(&mut self) -> &'a mut GdbCommand<'_>
pub fn r(&mut self) -> &'a mut GdbCommand<'_>
Sourcepub fn c(&mut self) -> &'a mut GdbCommand<'_>
pub fn c(&mut self) -> &'a mut GdbCommand<'_>
Add command to continue execution
Sourcepub fn bt(&mut self) -> &'a mut GdbCommand<'_>
pub fn bt(&mut self) -> &'a mut GdbCommand<'_>
Add command to get backtrace (-ex bt)
Sourcepub fn disassembly(&mut self) -> &'a mut GdbCommand<'_>
pub fn disassembly(&mut self) -> &'a mut GdbCommand<'_>
Add command to get disassembly (-ex ‘x/16i $pc’)
Sourcepub fn regs(&mut self) -> &'a mut GdbCommand<'_>
pub fn regs(&mut self) -> &'a mut GdbCommand<'_>
Add command to get registers (-ex ‘i r’)
Sourcepub fn mappings(&mut self) -> &'a mut GdbCommand<'_>
pub fn mappings(&mut self) -> &'a mut GdbCommand<'_>
Add command to get mappings (-ex ‘info proc mappings’)
Sourcepub fn cmdline(&mut self) -> &'a mut GdbCommand<'_>
pub fn cmdline(&mut self) -> &'a mut GdbCommand<'_>
Add command to get cmd line.
Sourcepub fn env(&mut self) -> &'a mut GdbCommand<'_>
pub fn env(&mut self) -> &'a mut GdbCommand<'_>
Add command to get environment variables
Sourcepub fn status(&mut self) -> &'a mut GdbCommand<'_>
pub fn status(&mut self) -> &'a mut GdbCommand<'_>
Add command to get process status
Sourcepub fn sources(&mut self) -> &'a mut GdbCommand<'_>
pub fn sources(&mut self) -> &'a mut GdbCommand<'_>
Add command to get info
Sourcepub fn bmain(&mut self) -> &'a mut GdbCommand<'_>
pub fn bmain(&mut self) -> &'a mut GdbCommand<'_>
Break at main
Sourcepub fn timeout(&mut self, timeout: u64) -> &'a mut GdbCommand<'_>
pub fn timeout(&mut self, timeout: u64) -> &'a mut GdbCommand<'_>
Add timeout [sec]
Sourcepub fn list<T: Into<Option<&'a str>>>(
&mut self,
location: T,
) -> &'a mut GdbCommand<'_>
pub fn list<T: Into<Option<&'a str>>>( &mut self, location: T, ) -> &'a mut GdbCommand<'_>
Print lines from source file
§Arguments
location
- lines centered around the line specified by location. If None then location is current line.
Sourcepub fn mem<T: AsRef<str>>(
&mut self,
expr: T,
size: usize,
) -> &'a mut GdbCommand<'_>
pub fn mem<T: AsRef<str>>( &mut self, expr: T, size: usize, ) -> &'a mut GdbCommand<'_>
Get memory contents (string of hex bytes)
§Arguments
-
expr
- expression that represents the start memory address. -
size
- size of memory in bytes to get.
Sourcepub fn siginfo(&mut self) -> &'a mut GdbCommand<'_>
pub fn siginfo(&mut self) -> &'a mut GdbCommand<'_>
Add command to get siginfo
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GdbCommand<'a>
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§
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
Mutably borrows from an owned value. Read more