Alistair Leslie-Hughes : dbghelp: Support UWOP_EPILOG in unwind.

Alexandre Julliard julliard at winehq.org
Thu Oct 14 15:09:34 CDT 2021


Module: wine
Branch: master
Commit: 40f0119739d36b03f4df5d525d098ec032f1a37b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=40f0119739d36b03f4df5d525d098ec032f1a37b

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Thu Oct 14 19:45:56 2021 +1100

dbghelp: Support UWOP_EPILOG in unwind.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dbghelp/cpu_x86_64.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c
index 8e8ac85dd2f..4fd8d76e010 100644
--- a/dlls/dbghelp/cpu_x86_64.c
+++ b/dlls/dbghelp/cpu_x86_64.c
@@ -209,6 +209,19 @@ static void dump_unwind_info(struct cpu_stack_walk* csw, ULONG64 base, RUNTIME_F
             case UWOP_PUSH_MACHFRAME:
                 TRACE("PUSH_MACHFRAME %u\n", info->UnwindCode[i].u.OpInfo);
                 break;
+            case UWOP_EPILOG:
+                if (info->Version == 2)
+                {
+                    unsigned int offset;
+                    if (info->UnwindCode[i].u.OpInfo)
+                        offset = info->UnwindCode[i].u.CodeOffset;
+                    else
+                        offset = (info->UnwindCode[i+1].u.OpInfo << 8) + info->UnwindCode[i+1].u.CodeOffset;
+                    TRACE("UWOP_EPILOG %u offset %u\n", info->UnwindCode[i].u.OpInfo, offset);
+                    i += 1;
+                    break;
+                }
+                /* Fall through */
             default:
                 FIXME("unknown code %u\n", info->UnwindCode[i].u.UnwindOp);
                 break;
@@ -490,7 +503,7 @@ static BOOL interpret_function_table_entry(struct cpu_stack_walk* csw,
             return FALSE;
         }
 
-        if (info->Version != 1)
+        if (info->Version != 1 && info->Version != 2)
         {
             WARN("unknown unwind info version %u at %lx\n", info->Version, base + function->UnwindData);
             return FALSE;




More information about the wine-cvs mailing list