Commit 42846e1a authored by Kenton Varda's avatar Kenton Varda

Subtract 1 from return addresses on Windows, just like we now do on other platforms.

parent 12eccba0
...@@ -152,7 +152,9 @@ ArrayPtr<void* const> getStackTrace(ArrayPtr<void*> space, uint ignoreCount, ...@@ -152,7 +152,9 @@ ArrayPtr<void* const> getStackTrace(ArrayPtr<void*> space, uint ignoreCount,
break; break;
} }
space[count] = reinterpret_cast<void*>(frame.AddrPC.Offset); // Subtract 1 from each address so that we identify the calling instructions, rather than the
// return addresses (which are typically the instruction after the call).
space[count] = reinterpret_cast<void*>(frame.AddrPC.Offset - 1);
} }
return space.slice(kj::min(ignoreCount, count), count); return space.slice(kj::min(ignoreCount, count), count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment