#pdb #source #windows #symbols #file-path #lookup #pdbstr

srcsrv

Interpret the contents of a srcsrv stream from a pdb file (Microsoft Source Server)

5 releases

new 0.2.3 Mar 7, 2025
0.2.2 Sep 29, 2021
0.2.1 Sep 28, 2021
0.2.0 Sep 28, 2021
0.1.0 Sep 27, 2021

#171 in Debugging

Download history 429/week @ 2024-11-16 422/week @ 2024-11-23 651/week @ 2024-11-30 482/week @ 2024-12-07 475/week @ 2024-12-14 260/week @ 2024-12-21 299/week @ 2024-12-28 485/week @ 2025-01-04 413/week @ 2025-01-11 628/week @ 2025-01-18 383/week @ 2025-01-25 1158/week @ 2025-02-01 522/week @ 2025-02-08 592/week @ 2025-02-15 780/week @ 2025-02-22 760/week @ 2025-03-01

2,719 downloads per month
Used in 10 crates (2 directly)

MIT/Apache

38KB
606 lines

crates.io page docs.rs page

srcsrv

Parse a srcsrv stream from a Windows PDB file and look up file paths to see how the source for these paths can be obtained:

use srcsrv::{SrcSrvStream, SourceRetrievalMethod};

if let Ok(srcsrv_stream) = pdb.named_stream(b"srcsrv") {
    let stream = SrcSrvStream::parse(srcsrv_stream.as_slice())?;
    let url = match stream.source_for_path(
        r#"C:\build\renderdoc\renderdoc\data\glsl\gl_texsample.h"#,
        r#"C:\Debugger\Cached Sources"#,
    )? {
        SourceRetrievalMethod::Download { url } => Some(url),
        _ => None,
    };
    assert_eq!(url, Some("https://raw.githubusercontent.com/baldurk/renderdoc/v1.15/renderdoc/data/glsl/gl_texsample.h".to_string()));
}

Further reading

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.3–1MB
~19K SLoC