Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

feat: Document WASM protocol extensions #209

Merged
merged 2 commits into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 47 additions & 3 deletions src/docs/sdk/event-payloads/debugmeta.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ prefixed with `"0x"`.

`image_size`

: **Required**. The size of the image in virtual memory. If missing, Sentry will
assume that the image spans up to the next image, which might lead to invalid
stack traces.
: The size of the image in virtual memory. If missing, Sentry will assume that
the image spans up to the next image, which might lead to invalid stack traces.

`debug_id`

Expand Down Expand Up @@ -308,6 +307,51 @@ Example:
}
```

### WASM Images

WASM images are used on for WebAssembly. Their structure is identical to other
native images.

Attributes:

`type`

: **Required**. Type of the debug image. Must be `"wasm"`.

`debug_id`

: **Required**. Identifier of the dynamic library or executable. It is the value
of the `build_id` custom section and must be formatted as UUID truncated to the
leading 16 bytes.

`debug_file`

: _Optional_: Name or absolute URL to the WASM file containing debug
information for this image. This value might be required to retrieve debug
files from certain symbol servers. This should correspond to the externalized
URL pulled from the `external_debug_info` custom section.

`code_id`

: _Optional_. Identifier of the WASM file. It is the value of the
`build_id` custom section formatted as HEX string. It can be omitted in case
the section contains a UUID (16 bytes).

`code_file`

: **Required**. The absolute URL to the wasm file. This helps
to locate the file if it is missing on Sentry.

Example:

```json
{
"type": "wasm",
"debug_id": "84a04d24-0e60-3810-a8c0-90a65e2df61a",
"debug_file": "sample.wasm"
}
```

### Proguard Images

Proguard images refer to `mapping.txt` files generated when Proguard obfuscates
Expand Down
14 changes: 12 additions & 2 deletions src/docs/sdk/event-payloads/stacktrace.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,23 @@ The following attributes are primarily used for C-based languages:
: An optional instruction address for symbolication. This should be a string
with a hexadecimal number that includes a `0x` prefix. If this is set and a
known image is defined in the [Debug Meta Interface](/sdk/event-payloads/debugmeta/), then
symbolication can take place.
symbolication can take place. Note that the `addr_mode` attribute can
control the behavior of this address.

`addr_mode`

: Optionally changes the addressing mode. The default value is the same as `"abs"`
which means absolute referencing. This can also be set to `"rel:DEBUG_ID"` or
`"rel:IMAGE_INDEX"` to make addresses relative to an object referenced by debug id
or index. This for instance is necessary for WASM processing as WASM does not use
a unified address space.

`symbol_addr`

: An optional address that points to a symbol. We use the instruction
address for symbolication, but this can be used to calculate an instruction
offset automatically.
offset automatically. Note that the `addr_mode` attribute can
control the behavior of this address.

`image_addr`

Expand Down