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

srcsrv

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

4 releases

0.2.2 Sep 29, 2021
0.2.1 Sep 28, 2021
0.2.0 Sep 28, 2021
0.1.0 Sep 27, 2021

#557 in Debugging

Download history 373/week @ 2024-07-20 467/week @ 2024-07-27 332/week @ 2024-08-03 347/week @ 2024-08-10 333/week @ 2024-08-17 301/week @ 2024-08-24 364/week @ 2024-08-31 305/week @ 2024-09-07 315/week @ 2024-09-14 335/week @ 2024-09-21 343/week @ 2024-09-28 482/week @ 2024-10-05 363/week @ 2024-10-12 342/week @ 2024-10-19 339/week @ 2024-10-26 328/week @ 2024-11-02

1,416 downloads per month
Used in 9 crates (2 directly)

MIT/Apache

37KB
571 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.4–1MB
~22K SLoC