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 |
#599 in Debugging
2,001 downloads per month
Used in 9 crates
(2 directly)
37KB
571 lines
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:
- Either by downloading the file from a URL directly (
SourceRetrievalMethod::Download
), - or by executing a command, which will create the file at a certain path (
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()));
}
Further reading
- Source indexing for github projects
- Microsoft documentation: Overview
- Microsoft documentation: Language specification
License
Licensed under either of
- Apache License, Version 2.0 (
LICENSE-APACHE
or http://www.apache.org/licenses/LICENSE-2.0) - MIT license (
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.
Dependencies
~0.3–1MB
~20K SLoC