pub fn print_backtrace(&self, debug_data: &DwarfData) -> Result<(), nix::Error> {
        let pid = self.pid();
        let mut rip = ptrace::getregs(pid)?.rip as usize;
        let mut rbp = ptrace::getregs(pid)?.rbp as usize;
        loop {
            let func_name = debug_data.get_function_from_addr(rip).ok_or(nix::Error::Sys(nix::errno::Errno::EINVAL))?;
            let func_line = debug_data.get_line_from_addr(rip).ok_or(nix::Error::Sys(nix::errno::Errno::EINVAL))?;
            println!("{} ({})", func_name, func_line);
            if func_name == "main" { break; }
            rip = ptrace::read(pid, (rbp + 8) as ptrace::AddressType)? as usize;
            rbp = ptrace::read(pid, rbp as ptrace::AddressType)? as usize;
        }
        Ok(())
    }
/// Print this inferior's backtrace using debugging symbols
Print this inferior's backtrace using debugging symbols
Print this inferior ' s backtrace using debugging symbols
pub fn print_backtrace(&self, debug_data: &DwarfData) -> Result<(), nix::Error> {
        let pid = self.pid();
        let mut rip = ptrace::getregs(pid)?.rip as usize;
        let mut rbp = ptrace::getregs(pid)?.rbp as usize;
        loop {
            let func_name = debug_data.get_function_from_addr(rip).ok_or(nix::Error::Sys(nix::errno::Errno::EINVAL))?;
            let func_line = debug_data.get_line_from_addr(rip).ok_or(nix::Error::Sys(nix::errno::Errno::EINVAL))?;
            println!("{} ({})", func_name, func_line);
            if func_name == "main" { break; }
            rip = ptrace::read(pid, (rbp + 8) as ptrace::AddressType)? as usize;
            rbp = ptrace::read(pid, rbp as ptrace::AddressType)? as usize;
        }
        Ok(())
    }
pub fn print_backtrace ( & self , debug_data : & DwarfData ) -> Result < ( ) , nix :: Error > { let pid = self . pid ( ) ; let mut rip = ptrace :: getregs ( pid ) ? . rip as usize ; let mut rbp = ptrace :: getregs ( pid ) ? . rbp as usize ; loop { let func_name = debug_data . get_function_from_addr ( rip ) . ok_or ( nix :: Error :: Sys ( nix :: errno :: Errno :: EINVAL ) ) ? ; let func_line = debug_data . get_line_from_addr ( rip ) . ok_or ( nix :: Error :: Sys ( nix :: errno :: Errno :: EINVAL ) ) ? ; println ! ( " " func_name func_line ) ; if func_name == " " { break ; } rip = ptrace :: read ( pid , ( rbp + 8 ) as ptrace :: AddressType ) ? as usize ; rbp = ptrace :: read ( pid , rbp as ptrace :: AddressType ) ? as usize ; } Ok ( ( ) ) }
Print this inferior's backtrace using debugging symbols
Print this inferior ' s backtrace using debugging symbols
&self
debug_data
&DwarfData
&self
debug_data
&DwarfData