Skip to content

Commit 20fc3be

Browse files
authored
feat(proguard): Mark synthesized methods on frames (#1735)
Depends on #1734. This adds a field `method_synthesized` to `JvmFrame` that denotes whether the frame's method was synthesized by the compiler. Closes #1720. Closes SYMBOLI-22.
1 parent 8971ce0 commit 20fc3be

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
- Bump `proguard` from v5.5.0 to v5.6.1
88
This also bumps the proguard cache version from v3 to v4. ([#1734](https://github.com/getsentry/symbolicator/pull/1734))
99

10+
### Various fixes & improvements
11+
12+
- Symbolicated JVM frames are now marked according to whether their method was
13+
synthesized by the compiler. ([#1735](https://github.com/getsentry/symbolicator/pull/1735))
14+
1015
## 25.7.0
1116

1217
### Various fixes & improvements

crates/symbolicator-proguard/src/interface.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ pub struct JvmFrame {
103103
/// instead of using line numbers.
104104
#[serde(skip_serializing_if = "Option::is_none")]
105105
pub signature: Option<String>,
106+
107+
/// Whether this frame's method was synthesized by the compiler.
108+
#[serde(default, skip_serializing_if = "is_false")]
109+
pub method_synthesized: bool,
110+
}
111+
112+
fn is_false(b: &bool) -> bool {
113+
!*b
106114
}
107115

108116
/// An exception in a JVM event.

crates/symbolicator-proguard/src/symbolication.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ impl ProguardService {
373373
.file()
374374
.map(String::from)
375375
.or_else(|| original_frame.filename.clone()),
376+
method_synthesized: new_frame.method_synthesized(),
376377
..original_frame.clone()
377378
};
378379

@@ -877,6 +878,7 @@ y.b -> y.b:
877878
abs_path: Some("CustomThreadFactory".into()),
878879
filename: Some("CustomThreadFactory".into()),
879880
index: 0,
881+
method_synthesized: true,
880882
..Default::default()
881883
}
882884
);

crates/symbolicator-proguard/tests/integration/snapshots/integration__proguard__source_lookup_with_proguard.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ stacktraces:
102102
lineno: 0
103103
in_app: true
104104
index: 18
105+
method_synthesized: true
105106
- function: onCreate$lambda-1
106107
module: io.sentry.samples.instrumentation.ui.EditActivity
107108
lineno: 37

0 commit comments

Comments
 (0)