Crates.io | srcsrv |
lib.rs | srcsrv |
version | 0.2.2 |
source | src |
created_at | 2021-09-27 06:49:37.740489 |
updated_at | 2021-09-29 03:23:44.59287 |
description | Interpret the contents of a srcsrv stream from a pdb file (Microsoft Source Server). |
homepage | |
repository | https://github.com/mstange/srcsrv |
max_upload_size | |
id | 456830 |
size | 48,302 |
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:
SourceRetrievalMethod::Download
),SourceRetrievalMethod::ExecuteCommand
)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()));
}
Licensed under either of
LICENSE-APACHE
or http://www.apache.org/licenses/LICENSE-2.0)LICENSE-MIT
or http://opensource.org/licenses/MIT)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.