Skip to content

Commit 68543cf

Browse files
authored
fix: Completely skip over hidden sequence points (#769)
It is a bit unclear how to really treat these hidden sequence points. However just setting the line to `0` means we do find a source location (with line `0`) on lookup, and then later on we apply the wrong source context lines. By ignoring these, we do get the correct source line (and thus source context) for the linked customer issue.
1 parent 1b4adbd commit 68543cf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
**Features**:
6+
7+
- Skip hidden sequence points when creating PortablePDB cache. ([#769](https://github.com/getsentry/symbolic/pull/769))
8+
39
## 12.1.0
410

511
**Features**:

symbolic-ppdb/src/cache/writer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ impl PortablePdbCacheConverter {
4343
let sequence_points = sequence_points?;
4444

4545
for sp in sequence_points.iter() {
46+
if sp.is_hidden() {
47+
continue;
48+
}
4649
let range = raw::Range {
4750
func_idx,
4851
il_offset: sp.il_offset,
@@ -51,7 +54,7 @@ impl PortablePdbCacheConverter {
5154
let doc = portable_pdb.get_document(sp.document_id as usize)?;
5255
let file_idx = self.insert_file(&doc.name, doc.lang);
5356
let source_location = raw::SourceLocation {
54-
line: if sp.is_hidden() { 0 } else { sp.start_line },
57+
line: sp.start_line,
5558
file_idx,
5659
};
5760

0 commit comments

Comments
 (0)