resym

Crates.ioresym
lib.rsresym
version0.2.0
created_at2025-02-13 13:14:40.482787+00
updated_at2025-02-16 06:08:08.609419+00
descriptionSerialize and symbolicate stack traces from remotely located PBD
homepage
repositoryhttps://github.com/littledivy/resym
max_upload_size
id1554196
size28,361
Divy (littledivy)

documentation

README

Crates.io

Documentation | Example

resym

Serialize and symbolicate stack traces from remotely located PDB.

[dependencies]
resym = "0.1"

Here's an example:

// your application

fn set_panic_hook() {
  std::panic::set_hook(Box::new(move |info| {
    #[cfg(all(target_os = "windows", target_arch = "x86_64"))]
    {
      let trace_str = resym::win64::trace();
      println!("Visit to symbolicate: http://<resym_svc>/{}", trace_str);
    }
  }));
}

fn main() {
  set_panic_hook();

  panic!("oh no!");
}
// your symbolification service

// GET /<trace_str>
fn handle_request(mut trace_str: Vec<u8>) -> Result<String> {
  let mut writer = Vec::new();
  let stream = std::fs::File::open("example.pdb")?;

  resym::symbolicate(stream, &mut trace_str, resym::DefaultFormatter::new(&mut writer))?;

  Ok(String::from_utf8(writer)?)
}

image

Commit count: 10

cargo fmt