fn get_stack_info()

in src/object_info.rs [86:101]


fn get_stack_info(pdb: Option<&Object>, pe: Option<&Object>) -> String {
    let mut buf = Vec::new();
    let mut cfi_writer = AsciiCfiWriter::new(&mut buf);

    let result = match (pdb, pe) {
        (_, Some(pe)) if pe.has_unwind_info() => cfi_writer.process(pe),
        (Some(pdb), _) if pdb.has_unwind_info() => cfi_writer.process(pdb),
        _ => Ok(()),
    };

    if let Err(e) = result {
        error!("CFI: {:?}", e);
    }

    String::from_utf8(buf).unwrap()
}