Skip to content

Commit

Permalink
feat: disable PC adjustment in the backend for libunwindstack (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
supervacuus authored May 9, 2023
1 parent d30e96d commit 6011498
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

**Features**:

- disable PC adjustment in the backend for libunwindstack ([#839](https://github.com/getsentry/sentry-native/pull/839))

**Internal**:

- Updated Breakpad backend to 2023-05-03. ([#836](https://github.com/getsentry/sentry-native/pull/836), [breakpad#35](https://github.com/getsentry/breakpad/pull/35))
Expand Down
8 changes: 8 additions & 0 deletions src/backends/sentry_backend_inproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,14 @@ make_signal_event(
sentry_value_t registers = sentry__registers_from_uctx(uctx);
sentry_value_set_by_key(stacktrace, "registers", registers);

#ifdef SENTRY_WITH_UNWINDER_LIBUNWINDSTACK
// libunwindstack already adjusts the PC according to `GetPcAdjustment()`
// https://github.com/getsentry/libunwindstack-ndk/blob/1929f7b601797fc8b2cac092d563b31d01d46a76/Regs.cpp#L187
// so there is no need to adjust the PC in the backend processing.
sentry_value_set_by_key(stacktrace, "instruction_addr_adjustment",
sentry_value_new_string("none"));
#endif

sentry_value_set_by_key(exc, "stacktrace", stacktrace);
sentry_event_add_exception(event, exc);

Expand Down

0 comments on commit 6011498

Please sign in to comment.