diff --git a/ci/test-all-configs.py b/ci/test-all-configs.py index 87c1475..00e0806 100644 --- a/ci/test-all-configs.py +++ b/ci/test-all-configs.py @@ -79,7 +79,7 @@ def output_matches(output: str, params: Tuple[str]): output = [line.strip().split("||") for line in output.split("\n")] max_line_diff = MAX_LINE_DIFF - if "CPPTRACE_UNWIND_WITH_UNWIND" in params: + if "CPPTRACE_UNWIND_WITH_UNWIND" in params or "CPPTRACE_UNWIND_WITH_DBGHELP" in params: max_line_diff = 0 errored = False diff --git a/src/unwind/unwind_with_dbghelp.cpp b/src/unwind/unwind_with_dbghelp.cpp index 55c8ba4..17d957c 100644 --- a/src/unwind/unwind_with_dbghelp.cpp +++ b/src/unwind/unwind_with_dbghelp.cpp @@ -112,7 +112,10 @@ namespace detail { if(skip) { skip--; } else { - trace.push_back(frame.AddrPC.Offset); + // On x86/x64/arm, as far as I can tell, the frame return address is always one after the call + // So we just decrement to get the pc back inside the `call` / `bl` + // This is done with _Unwind too but conditionally based on info from _Unwind_GetIPInfo. + trace.push_back(frame.AddrPC.Offset - 1); } } else { // base