Make guest debugger usable

This commit is contained in:
frazier_g
2024-05-07 11:51:52 -04:00
committed by Radosław Gliński
parent 5bbba85c70
commit c01c06d19b
4 changed files with 54 additions and 24 deletions

View File

@@ -240,10 +240,13 @@ class Win32StackWalker : public StackWalker {
// displacement in x64 from the JIT'ed code start to the PC.
if (function->is_guest()) {
auto guest_function = static_cast<GuestFunction*>(function);
// Adjust the host PC by -1 so that we will go back into whatever
// instruction was executing before the capture (like a call).
// GaryFrazier: Removed -1 as that does not reflect the guest pc of
// the host address Adjust the host PC by -1 so that we will go back
// into whatever instruction was executing before the capture (like
// a call).
frame.guest_pc =
guest_function->MapMachineCodeToGuestAddress(frame.host_pc - 1);
guest_function->MapMachineCodeToGuestAddress(frame.host_pc);
}
} else {
frame.guest_symbol.function = nullptr;