2 unstable releases

0.2.0 Oct 22, 2024
0.1.0 Oct 22, 2024

#406 in Debugging

Download history 293/week @ 2024-10-18 36/week @ 2024-10-25 15/week @ 2024-11-01 8/week @ 2024-11-08

352 downloads per month

MIT license

6.5MB
121K SLoC

C++ 89K SLoC // 0.2% comments M4 7.5K SLoC // 0.2% comments Shell 7.5K SLoC // 0.2% comments C 6.5K SLoC // 0.1% comments Objective-C++ 3.5K SLoC // 0.2% comments Objective-C 2K SLoC // 0.2% comments Automake 1.5K SLoC // 0.1% comments SWIG 1.5K SLoC // 0.0% comments Go 830 SLoC // 0.2% comments Visual Studio Project 610 SLoC GNU Style Assembly 467 SLoC // 0.3% comments Rust 218 SLoC // 0.0% comments Python 208 SLoC // 0.5% comments Batch 117 SLoC // 0.4% comments Xcode Config 21 SLoC // 0.8% comments Perl 6 SLoC Ruby 3 SLoC

Contains (Mach-o exe, 705KB) dump_syms_dwarf_data, (autotools obfuscated code, 325KB) third_party/breakpad/configure, (DOS exe, 145KB) dump_syms.exe, (DOS exe, 245KB) symupload.exe, (DOS exe, 85KB) dump_syms_regtest64.exe, (Windows DLL, 52KB) pe_only_symbol_test.dll and 4 more.

breakpad.rs

https://github.com/chosungmann/breakpad.rs/actions/workflows/continuous_integration.yaml/badge.svg

breakpad.rs is a Rust crate that enables the use of Breakpad in Rust applications. When a crash occurs, it generates a minidump and notifies related information through a designated delegate.

Example

struct Delegate;

impl breakpad_rs::ExceptionHandlerDelegate for Delegate {
    fn did_write_minidump(&self, working_path: String, minidump_id: String) {
        log::debug!("[did_write_minidump] working_path={working_path} minidump_id={minidump_id}");
    }

    fn get_working_path(&self) -> String {
        log::debug!("[get_working_path] return=.");
        String::from(".")
    }

    fn should_write_minidump(&self) -> bool {
        log::debug!("[should_write_minidump] return=true");
        true
    }
}

fn main() {
    env_logger::init();
    let _breakpad = breakpad_rs::Breakpad::new(Some(Box::new(Delegate)));
    unsafe {
        let null: *mut u8 = std::ptr::null_mut();
        *null = 42;
    }
}

References

Dependencies

~2.7–7.5MB
~143K SLoC