{"id":13667931,"url":"https://github.com/rust-minidump/rust-minidump","last_synced_at":"2025-05-13T23:08:00.472Z","repository":{"id":34301001,"uuid":"38209299","full_name":"rust-minidump/rust-minidump","owner":"rust-minidump","description":"Type definitions, parsing, and analysis for the minidump file format.","archived":false,"fork":false,"pushed_at":"2025-05-06T10:12:40.000Z","size":7919,"stargazers_count":459,"open_issues_count":86,"forks_count":68,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-11T16:41:22.017Z","etag":null,"topics":["crash-reporting","crash-reports","minidump","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"hendraanggrian/collapsingtoolbarlayout-subtitle","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-minidump.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-28T18:23:38.000Z","updated_at":"2025-04-21T12:14:59.000Z","dependencies_parsed_at":"2024-01-26T22:27:11.382Z","dependency_job_id":"c0d91d85-42c4-448f-9ce6-c4198897b940","html_url":"https://github.com/rust-minidump/rust-minidump","commit_stats":{"total_commits":739,"total_committers":29,"mean_commits":"25.482758620689655","dds":0.6982408660351827,"last_synced_commit":"c74ac93f30751e11f4caee50a55ad1833a061b14"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-minidump%2Frust-minidump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-minidump%2Frust-minidump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-minidump%2Frust-minidump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-minidump%2Frust-minidump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-minidump","download_url":"https://codeload.github.com/rust-minidump/rust-minidump/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254041432,"owners_count":22004722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crash-reporting","crash-reports","minidump","rust"],"created_at":"2024-08-02T07:00:54.745Z","updated_at":"2025-05-13T23:07:55.453Z","avatar_url":"https://github.com/rust-minidump.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"![Rust CI](https://github.com/rust-minidump/rust-minidump/workflows/Rust%20CI/badge.svg?branch=main)\n\n# Overview\n\nThis project provides type definitions, parsing, and analysis for the [minidump](https://msdn.microsoft.com/en-us/library/windows/desktop/ms680369%28v=vs.85%29.aspx) file format.\n\nIt's fairly heavily modeled after [Google Breakpad](https://chromium.googlesource.com/breakpad/breakpad/) for historical reasons, but there is no fundamental interoperability requirement between the two beyond the fact that they fundamentally handle the same inputs.\n\nThis project has no \"main\" crate. It is a collection of crates that are developed together. What crate you should use depends on how \"low-level\" in the minidump format you want to get. By default you'll probably want to use [minidump-processor](https://crates.io/crates/minidump-processor) (library) or [minidump-stackwalk](https://crates.io/crates/minidump-stackwalk) (application), which provide the richest analysis.\n\n# Examples\n\nParse a minidump with [minidump](https://crates.io/crates/minidump):\n\n```rust\nuse minidump::*;\n\nfn main() -\u003e Result\u003c(), Error\u003e {\n    // Read the minidump from a file\n    let mut dump = minidump::Minidump::read_path(\"../testdata/test.dmp\")?;\n\n    // Statically request (and require) several streams we care about:\n    let system_info = dump.get_stream::\u003cMinidumpSystemInfo\u003e()?;\n    let exception = dump.get_stream::\u003cMinidumpException\u003e()?;\n\n    // Combine the contents of the streams to perform more refined analysis\n    let crash_reason = exception.get_crash_reason(system_info.os, system_info.cpu);\n\n    // Conditionally analyze a stream\n    if let Ok(threads) = dump.get_stream::\u003cMinidumpThreadList\u003e() {\n        // Use `Default` to try to make progress when a stream is missing.\n        // This is especially natural for MinidumpMemoryList because\n        // everything needs to handle memory lookups failing anyway.\n        let mem = dump.get_memory().unwrap_or_default();\n\n        for thread in \u0026threads.threads {\n            let stack = thread.stack_memory(\u0026mem);\n            // ...\n        }\n    }\n    Ok(())\n}\n```\n\nAnalyze a minidump with [minidump-processor](https://crates.io/crates/minidump-processor):\n\n```rust\nuse minidump::Minidump;\nuse minidump_processor::{http_symbol_supplier, ProcessorOptions, Symbolizer};\nuse serde_json::Value;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), ()\u003e {\n    // Read the minidump\n    let dump = Minidump::read_path(\"../testdata/test.dmp\").map_err(|_| ())?;\n \n    // Configure the symbolizer and processor\n    let symbols_urls = vec![String::from(\"https://symbols.totallyrealwebsite.org\")];\n    let symbols_paths = vec![];\n    let mut symbols_cache = std::env::temp_dir();\n    symbols_cache.push(\"minidump-cache\");\n    let symbols_tmp = std::env::temp_dir();\n    let timeout = std::time::Duration::from_secs(1000);\n \n    // Use ProcessorOptions for detailed configuration\n    let options = ProcessorOptions::default();\n\n    // Specify a symbol supplier (here we're using the most powerful one, the http supplier)\n    let provider = Symbolizer::new(http_symbol_supplier(\n        symbols_paths,\n        symbols_urls,\n        symbols_cache,\n        symbols_tmp,\n        timeout,\n    ));\n \n    let state = minidump_processor::process_minidump_with_options(\u0026dump, \u0026provider, options)\n        .await\n        .map_err(|_| ())?;\n\n    // Write the JSON output to an arbitrary writer (here, a Vec).\n    // This is currently preferred because this output is more stable \n    // than the contents of ProcessState.\n    let mut json_output = Vec::new();\n    state.print_json(\u0026mut json_output, false).map_err(|_| ())?;\n\n    // Now parse it (here parsed into an arbitrary JSON Object for max flexibility).\n    let json: Value = serde_json::from_slice(\u0026json_output).map_err(|_| ())?;\n\n    // Now read whatever values you want out of it\n    if let Some(Value::Number(pid)) = json.get(\"pid\") {\n        println!(\"pid: {}\", pid);\n    }\n\n    Ok(())\n}\n```\n\nAnalyze a (Firefox) minidump with [minidump-stackwalk](https://crates.io/crates/minidump-stackwalk):\n\n```text\n\u003e cargo install minidump-stackwalk\n\u003e minidump-stackwalk --symbols-url=https://symbols.mozilla.org/ /path/to/minidump.dmp\n\nOperating system: Linux\n                  0.0.0 Linux 5.13.4-201.fc35.x86_64 #1 SMP Wed Nov 24 12:56:51 UTC 2021 x86_64\nCPU: amd64\n     family 6 model 94 stepping 1\n     8 CPUs\n\nCrash reason:  SIGSEGV / SEGV_MAPERR\nCrash address: 0x0\nProcess uptime: not available\n\nThread 0  (crashed)\n 0  libxul.so!mozilla::dom::PlacesObservers::NotifyListeners(mozilla::dom::Sequence\u003cmozilla::OwningNonNull\u003cmozilla::dom::PlacesEvent\u003e \u003e const\u0026) [PlacesObservers.cpp:d03f875556391582e06abbf647835af8ca59f94b : 280 + 0x11]\n    rax = 0x00007fa5003b9af7   rdx = 0x0000000000000001\n    rcx = 0x0000561011e9d4a8   rbx = 0x00007fa4b76db4a0\n    rsi = 0x0000000000000000   rdi = 0x00007fffe0a39ee0\n    rbp = 0x00007ffae0a3aea0   rsp = 0x00007ffaea3a9e30\n     r8 = 0x0000000000000004    r9 = 0x00007f45075000e8\n    r10 = 0xb4a62ad906997b2b   r11 = 0x00007a4507500b00\n    r12 = 0x00007affe0a3a070   r13 = 0x00007fa5007abc60\n    r14 = 0x00007ffae0a39ee0   r15 = 0x00007fa5001a7e90\n    rip = 0x00007f44ff0caed1\n    Found by: given as instruction pointer in context\n 1  libxul.so!mozilla::places::NotifyRankingChanged::Run() [NotifyRankingChanged.h:d03f875556391582e06abbf647835af8ca59f94b : 32 + 0x7]\n    rbx = 0x00007a44b76db4f0   rbp = 0x00007fffe0a3af10\n    rsp = 0x00007ffae0a3aee0   r12 = 0x00007ffae0a3a0a0\n    r13 = 0x00007f4500afbc60   r14 = 0x00007fffe0a39ee0\n    r15 = 0x00007fa5001a7a90   rip = 0x00007fa4ff7a96eb\n    Found by: call frame info\n 2  libxul.so!mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock\u003cmozilla::Mutex\u0026\u003e const\u0026) [TaskController.cpp:d03f875556391582e06abbf647835af8ca59f94b : 771 + 0x4]\n    rbx = 0x000000000000001c   rbp = 0x00007fafe0a3a5a0\n    rsp = 0x00007fffa0a39f20   r12 = 0x00007ffae0aaa070\n    r13 = 0x00007f45007fba60   r14 = 0x00007fa502ad4270\n    r15 = 0x00007fa49b04a480   rip = 0x00007f44fe142872\n    Found by: call frame info\n ...\n```\n\n# Libraries\n\n## [minidump-common](minidump-common) [![crates.io](https://img.shields.io/crates/v/minidump-common.svg)](https://crates.io/crates/minidump-common) [![](https://docs.rs/minidump-common/badge.svg)](https://docs.rs/minidump-common)\n\nBasically \"minidump-sys\" -- minidump types and traits that are shared among several crates.\n\nMost notably [format.rs](minidump-common/src/format.rs) is basically a giant native rust header for [minidumpapiset.h](https://docs.microsoft.com/en-us/windows/win32/api/minidumpapiset/) (with extra useful things added in like error code enums and breakpad extensions).\n\n## [minidump](minidump) [![crates.io](https://img.shields.io/crates/v/minidump.svg)](https://crates.io/crates/minidump) [![](https://docs.rs/minidump/badge.svg)](https://docs.rs/minidump)\n\nBasic parsing of the minidump format.\n\nMinidump provides an interface for lazily enumerating and querying the \"streams\" of a minidump. It does its best to parse out values without additional context (like debuginfo). Properly parsing some values (such as the cpu contexts of each thread) may depend on multiple streams, in such a situation the method to get a\nvalue will from a stream will request its dependencies.\n\nIf you want richer analysis of the minidump (such as stackwalking and symbolication), use minidump-processor.\n\n## [minidump-processor](minidump-processor) [![crates.io](https://img.shields.io/crates/v/minidump-processor.svg)](https://crates.io/crates/minidump-processor) [![](https://docs.rs/minidump-processor/badge.svg)](https://docs.rs/minidump-processor)\n\nHigh-level minidump analysis.\n\nBuilds on top of the `minidump` crate to provide a complete digest of the information in the minidump. Also provides machine-readable (JSON) and human-readable printing of these digests. If you don't actually care about how the minidump format works, this library will take care of all the details for you.\n\nThe biggest feature of minidump-processor is that it does stackwalking (computes a backtrace for every thread). Its analysis can be enhanced by providing it with symbols (i.e. using `breakpad-symbols`), producing more precise backtraces and symbolication (function names, source lines, etc.).\n\nIt also knows all of the \"quirks\" of minidumps, and can smooth over details that are impractical for the minidump crate to handle.\n\n## [breakpad-symbols](breakpad-symbols) [![crates.io](https://img.shields.io/crates/v/breakpad-symbols.svg)](https://crates.io/crates/breakpad-symbols) [![](https://docs.rs/breakpad-symbols/badge.svg)](https://docs.rs/breakpad-symbols)\n\nFetching, parsing, and evaluation of Breakpad's [text format .sym files](https://chromium.googlesource.com/breakpad/breakpad/+/master/docs/symbol_files.md).\n\nFetches breakpad symbol files from disk or [a server](https://tecken.readthedocs.io/en/latest/download.html), and provides an on-disk temp symbol file cache.\n\nPermissively parses breakpad symbol files to smooth over the unfortunately-very-common situation of corrupt debuginfo. Will generally try to recover the parse by discarding corrupt lines or arbitrarily picking one value when conflicts are found.\n\nProvides an API for resolving functions and source line info by address from symbol files.\n\nProvides an API for evaluating breakpad CFI (and WIN) expressions.\n\nThis is primarily designed for use by minidump-processor.\n\n## [minidump-synth](minidump-synth)\n\nProvides a simple interface for mocking minidumps for unit tests.\n\nThis is basically an internal dev-dependency of rust-minidump that we're publishing only so that `cargo publish` doesn't complain about it. I guess you could use it but we don't recommend it?\n\n# Applications\n\n## [minidump-stackwalk](minidump-stackwalk) [![crates.io](https://img.shields.io/crates/v/minidump-stackwalk.svg)](https://crates.io/crates/minidump-stackwalk) [![](https://docs.rs/minidump-stackwalk/badge.svg)](https://docs.rs/minidump-stackwalk)\n\nA CLI frontend for `minidump-processor`, providing both machine-readable and human-readable\ndigests of a minidump with backtraces and symbolication.\n\nAlso includes the functionality of the old minidump_dump tool (see the --dump flag).\n\nSee the [README](minidump-stackwalk/README.md) for details.\n\n# License\n\nThis software is provided under the MIT license. See [LICENSE](LICENSE).\n\n# Release Notes\n\nSee [RELEASES.md](RELEASES.md) for release notes, commits, and details on the upcoming release.\n\n# Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for what is expected of patches, and detailed discussion of testing/documenting rust-minidump.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-minidump%2Frust-minidump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-minidump%2Frust-minidump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-minidump%2Frust-minidump/lists"}