Adjust pc for better line number reporting with StackWalk64
This commit is contained in:
parent
97de21e977
commit
59b5e80256
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user