-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(proguard): Add types for JVM requests
- Loading branch information
1 parent
e145e5c
commit e6c43fb
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,62 @@ | ||
use std::sync::Arc; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use symbolic::common::DebugId; | ||
use symbolicator_service::types::{RawObjectInfo, Scope}; | ||
use symbolicator_sources::SourceConfig; | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct SymbolicateJvmStacktraces { | ||
pub scope: Scope, | ||
pub sources: Arc<[SourceConfig]>, | ||
pub exceptions: Vec<JvmException>, | ||
pub modules: Vec<JvmModule>, | ||
/// Whether to apply source context for the stack frames. | ||
pub apply_source_context: bool, | ||
} | ||
|
||
#[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq)] | ||
pub struct JvmFrame { | ||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub function: Option<String>, | ||
|
||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub filename: Option<String>, | ||
|
||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub module: Option<String>, | ||
|
||
pub abs_path: String, | ||
|
||
pub lineno: u32, | ||
|
||
#[serde(default, skip_serializing_if = "Vec::is_empty")] | ||
pub pre_context: Vec<String>, | ||
|
||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub context_line: Option<String>, | ||
|
||
#[serde(default, skip_serializing_if = "Vec::is_empty")] | ||
pub post_context: Vec<String>, | ||
|
||
#[serde(skip_serializing_if = "Option::is_none")] | ||
pub in_app: Option<bool>, | ||
} | ||
|
||
#[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq)] | ||
pub struct JvmException { | ||
#[serde(rename = "type")] | ||
ty: String, | ||
module: String, | ||
stacktrace: JvmStacktrace, | ||
} | ||
|
||
#[derive(Debug, Default, Clone, Deserialize, Serialize, PartialEq, Eq)] | ||
pub struct JvmStacktrace { | ||
frames: Vec<JvmFrame>, | ||
} | ||
|
||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)] | ||
pub struct JvmModule { | ||
uuid: DebugId, | ||
} |