diff --git a/CHANGELOG.md b/CHANGELOG.md index 19601e70e..309ced6b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 Crashpad backend to 2023-05-03. ([#837](https://github.com/getsentry/sentry-native/pull/837), [crashpad#82](https://github.com/getsentry/crashpad/pull/82)) diff --git a/src/backends/sentry_backend_inproc.c b/src/backends/sentry_backend_inproc.c index 32887a033..4d1b9e4d5 100644 --- a/src/backends/sentry_backend_inproc.c +++ b/src/backends/sentry_backend_inproc.c @@ -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);