[PATCH 1/3] [DbgHelp]: fix a couple of bugs in function table interpretation for x86-64 processors

Eric Pouech eric.pouech at orange.fr
Sun Jan 22 06:00:01 CST 2012




A+
---

 dlls/dbghelp/cpu_x86_64.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c
index 95570b6..6288d38 100644
--- a/dlls/dbghelp/cpu_x86_64.c
+++ b/dlls/dbghelp/cpu_x86_64.c
@@ -433,22 +433,22 @@ static BOOL interpret_function_table_entry(struct cpu_stack_walk* csw,
                 break;
             case UWOP_SAVE_NONVOL:  /* movq %reg,n(%rsp) */
                 off = newframe + *(USHORT*)&info->UnwindCode[i+1] * 8;
-                if (!sw_read_mem(csw, context->Rsp, &value, sizeof(DWORD64))) return FALSE;
+                if (!sw_read_mem(csw, off, &value, sizeof(DWORD64))) return FALSE;
                 set_int_reg(context, info->UnwindCode[i].OpInfo, value);
                 break;
             case UWOP_SAVE_NONVOL_FAR:  /* movq %reg,nn(%rsp) */
                 off = newframe + *(DWORD*)&info->UnwindCode[i+1];
-                if (!sw_read_mem(csw, context->Rsp, &value, sizeof(DWORD64))) return FALSE;
+                if (!sw_read_mem(csw, off, &value, sizeof(DWORD64))) return FALSE;
                 set_int_reg(context, info->UnwindCode[i].OpInfo, value);
                 break;
             case UWOP_SAVE_XMM128:  /* movaps %xmmreg,n(%rsp) */
                 off = newframe + *(USHORT*)&info->UnwindCode[i+1] * 16;
-                if (!sw_read_mem(csw, context->Rsp, &floatvalue, sizeof(M128A))) return FALSE;
+                if (!sw_read_mem(csw, off, &floatvalue, sizeof(M128A))) return FALSE;
                 set_float_reg(context, info->UnwindCode[i].OpInfo, floatvalue);
                 break;
             case UWOP_SAVE_XMM128_FAR:  /* movaps %xmmreg,nn(%rsp) */
                 off = newframe + *(DWORD*)&info->UnwindCode[i+1];
-                if (!sw_read_mem(csw, context->Rsp, &floatvalue, sizeof(M128A))) return FALSE;
+                if (!sw_read_mem(csw, off, &floatvalue, sizeof(M128A))) return FALSE;
                 set_float_reg(context, info->UnwindCode[i].OpInfo, floatvalue);
                 break;
             case UWOP_PUSH_MACHFRAME:




More information about the wine-patches mailing list