Crate srcsrv[−][src]
Expand description
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"#,
)? {
Some(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()));
}
Structs
A parsed representation of the srcsrv
stream from a PDB file.
Enums
An enum for errors that can occur when looking up the SourceRetrievalMethod for a file, and when evaluating the variables.
An enum for errors that occur during stream parsing.
Describes how the source file can be obtained.
Type Definitions
A map of variables with their evaluated values.