Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ebdbaee
feat(debuginfo): Extract srcsrv data from PDB for file mapping
mujacica Nov 10, 2025
e832235
Add srcsrv to pdb
mujacica Nov 10, 2025
2a0e0d8
Cleanup implementation
mujacica Nov 10, 2025
b234ddb
Fix format/changelog
mujacica Nov 10, 2025
8fff473
Fix path handling
mujacica Nov 11, 2025
b7cb2d1
Don't prepend
mujacica Nov 11, 2025
12a41bb
Rework to use PdbDebugSession
mujacica Nov 11, 2025
2c8521f
Revert the rest of the files
mujacica Nov 11, 2025
f9f84e1
Support function iterator
mujacica Nov 11, 2025
63ef28c
Review comments
mujacica Nov 13, 2025
8262b0e
Update symbolic-debuginfo/src/pdb.rs
mujacica Nov 13, 2025
1ca76a3
Update symbolic-debuginfo/src/pdb.rs
mujacica Nov 13, 2025
a5afa5e
Extract the revision and support both formats
mujacica Dec 9, 2025
6b9f3c1
Rework based on feedback from Sebastian
mujacica Dec 15, 2025
6290cd3
Remove unused import
mujacica Dec 15, 2025
d879081
Merge branch 'master' into feat/perforce-srcsrv-support
loewenheim Apr 14, 2026
524623f
Remove orphaned modules
loewenheim Apr 15, 2026
72df305
Refactor
loewenheim Apr 15, 2026
6fbf4ec
Put srcsrv information besides original instead of overwriting
loewenheim Apr 15, 2026
2c2c298
Remove function
loewenheim Apr 15, 2026
bcc01e1
Expand Perforce variant documentation
loewenheim Apr 15, 2026
1f3e73c
Document when parsing SourceServerMappings fails
loewenheim Apr 15, 2026
9603f9e
Typo
loewenheim Apr 15, 2026
e3e841a
Fix doc link
loewenheim Apr 15, 2026
4ef2e49
More minor corrections
loewenheim Apr 15, 2026
9b2ff63
Move "no vcs" error
loewenheim Apr 17, 2026
c6ff18f
Don't error when failing to open srcsrv data
loewenheim Apr 17, 2026
c9e477e
correct some comments
loewenheim Apr 17, 2026
6f86859
Don't needlessly use pub(crate)
loewenheim Apr 17, 2026
7639205
Prefix revision with srcsrv
loewenheim Apr 17, 2026
5cbc898
Simplify tests
loewenheim Apr 17, 2026
a93142c
Add unit test
loewenheim Apr 17, 2026
ac444aa
Merge branch 'master' into feat/perforce-srcsrv-support
loewenheim Apr 17, 2026
ed90fde
Fixup test_cache.rs
loewenheim Apr 17, 2026
d0a2953
Expand comment
loewenheim Apr 17, 2026
c144b3b
Some more doc comments
loewenheim Apr 17, 2026
0fbed54
Merge branch 'master' into feat/perforce-srcsrv-support
loewenheim May 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

**Features**

- Extract srcsrv data from PDB for file mapping ([#943](https://github.com/getsentry/symbolic/pull/943))

## 12.17.0

- feat(pdb): Extract the srcsrv integration name for metrics ([#944](https://github.com/getsentry/symbolic/pull/944))
Expand Down
37 changes: 35 additions & 2 deletions symbolic-debuginfo/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,19 @@ pub struct FileInfo<'data> {
name: Cow<'data, [u8]>,
/// Path to the file.
dir: Cow<'data, [u8]>,
/// The optional VCS revision (e.g., Perforce changelist, git commit hash).
revision: Option<Cow<'data, str>>,
Comment thread
loewenheim marked this conversation as resolved.
Outdated
}

impl<'data> FileInfo<'data> {
/// Creates a `FileInfo` with a given directory and the file name.
#[cfg(feature = "dwarf")]
pub fn new(dir: Cow<'data, [u8]>, name: Cow<'data, [u8]>) -> Self {
FileInfo { name, dir }
FileInfo {
name,
dir,
revision: None,
}
}

/// Creates a `FileInfo` from a joined path by trying to split it.
Expand All @@ -470,12 +476,12 @@ impl<'data> FileInfo<'data> {
Some(dir) => Cow::Borrowed(dir),
None => Cow::default(),
},
revision: None,
}
}

/// Creates a `FileInfo` from a joined path by trying to split it.
/// Unlike from_path(), copies the given data instead of referencing it.
#[cfg(feature = "ppdb")]
pub(crate) fn from_path_owned(path: &[u8]) -> Self {
let (dir, name) = symbolic_common::split_path_bytes(path);

Expand All @@ -485,6 +491,22 @@ impl<'data> FileInfo<'data> {
Some(dir) => Cow::Owned(dir.to_vec()),
None => Cow::default(),
},
revision: None,
}
}

/// Creates a `FileInfo` from a joined path and revision by trying to split the path.
/// Unlike from_path(), copies the given data instead of referencing it.
pub(crate) fn from_path_and_revision_owned(path: &[u8], revision: Option<String>) -> Self {
let (dir, name) = symbolic_common::split_path_bytes(path);

FileInfo {
name: Cow::Owned(name.to_vec()),
dir: match dir {
Some(dir) => Cow::Owned(dir.to_vec()),
None => Cow::default(),
},
revision: revision.map(Cow::Owned),
}
}

Expand All @@ -493,6 +515,7 @@ impl<'data> FileInfo<'data> {
FileInfo {
name: Cow::Borrowed(name),
dir: Cow::default(),
revision: None,
}
}

Expand All @@ -511,6 +534,16 @@ impl<'data> FileInfo<'data> {
let joined = join_path(&self.dir_str(), &self.name_str());
clean_path(&joined).into_owned()
}

/// The optional VCS revision (e.g., Perforce changelist, git commit hash).
pub fn revision(&self) -> Option<&str> {
self.revision.as_deref()
}

/// Sets the VCS revision for this file.
pub(crate) fn set_revision(&mut self, revision: Option<String>) {
self.revision = revision.map(Cow::Owned);
}
}

#[allow(clippy::ptr_arg)] // false positive https://github.com/rust-lang/rust-clippy/issues/9218
Expand Down
Loading
Loading