@@ -230,6 +230,13 @@ pub struct Frame {
230230 /// If known the location of symbol.
231231 #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
232232 pub symbol_addr : Option < Addr > ,
233+ /// Optionally changes the addressing mode. The default value is the same as
234+ /// `"abs"` which means absolute referencing. This can also be set to
235+ /// `"rel:DEBUG_ID"` or `"rel:IMAGE_INDEX"` to make addresses relative to an
236+ /// object referenced by debug id or index. This for instance is necessary
237+ /// for WASM processing as WASM does not use a unified address space.
238+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
239+ pub addr_mode : Option < String > ,
233240}
234241
235242/// Represents template debug info.
@@ -914,6 +921,9 @@ pub enum DebugImage {
914921 Symbolic ( SymbolicDebugImage ) ,
915922 /// A reference to a proguard debug file.
916923 Proguard ( ProguardDebugImage ) ,
924+ /// Image used for WebAssembly. Their structure is identical to other native
925+ /// images.
926+ Wasm ( WasmDebugImage ) ,
917927}
918928
919929impl DebugImage {
@@ -923,6 +933,7 @@ impl DebugImage {
923933 DebugImage :: Apple ( ..) => "apple" ,
924934 DebugImage :: Symbolic ( ..) => "symbolic" ,
925935 DebugImage :: Proguard ( ..) => "proguard" ,
936+ DebugImage :: Wasm ( ..) => "wasm" ,
926937 }
927938 }
928939}
@@ -984,9 +995,32 @@ pub struct ProguardDebugImage {
984995 pub uuid : Uuid ,
985996}
986997
998+ /// Represents a WebAssembly debug image.
999+ #[ derive( Serialize , Deserialize , Debug , Clone , PartialEq ) ]
1000+ pub struct WasmDebugImage {
1001+ /// The name of the debug image (usually filename)
1002+ pub name : String ,
1003+ /// Identifier of the dynamic library or executable.
1004+ pub debug_id : Uuid ,
1005+ /// Name or absolute URL to the WASM file containing debug information for
1006+ /// this image. This value might be required to retrieve debug files from
1007+ /// certain symbol servers. This should correspond to the externalized URL
1008+ /// pulled from the external_debug_info custom section.
1009+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
1010+ pub debug_file : Option < String > ,
1011+ /// Identifier of the WASM file. It is the value of the build_id custom
1012+ /// section formatted as HEX string.
1013+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
1014+ pub code_id : Option < String > ,
1015+ /// The absolute URL to the wasm file. This helps to locate the file if it
1016+ /// is missing on Sentry.
1017+ pub code_file : String ,
1018+ }
1019+
9871020into_debug_image ! ( Apple , AppleDebugImage ) ;
9881021into_debug_image ! ( Symbolic , SymbolicDebugImage ) ;
9891022into_debug_image ! ( Proguard , ProguardDebugImage ) ;
1023+ into_debug_image ! ( Wasm , WasmDebugImage ) ;
9901024
9911025/// Represents debug meta information.
9921026#[ derive( Serialize , Deserialize , Debug , Default , Clone , PartialEq ) ]
0 commit comments