Zebediah Figura : ntdll: Handle UWOP_EPILOG directives in x86_64 unwind info.

Alexandre Julliard julliard at winehq.org
Mon Aug 19 15:35:10 CDT 2019


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Fri Aug 16 18:31:50 2019 -0500

ntdll: Handle UWOP_EPILOG directives in x86_64 unwind info.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/signal_x86_64.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index cc34995..11795e5 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -396,6 +396,7 @@ struct UNWIND_INFO
 #define UWOP_SET_FPREG       3
 #define UWOP_SAVE_NONVOL     4
 #define UWOP_SAVE_NONVOL_FAR 5
+#define UWOP_EPILOG          6
 #define UWOP_SAVE_XMM128     8
 #define UWOP_SAVE_XMM128_FAR 9
 #define UWOP_PUSH_MACHFRAME  10
@@ -484,6 +485,19 @@ static void dump_unwind_info( ULONG64 base, RUNTIME_FUNCTION *function )
             case UWOP_PUSH_MACHFRAME:
                 TRACE( "PUSH_MACHFRAME %u\n", info->opcodes[i].info );
                 break;
+            case UWOP_EPILOG:
+                if (info->version == 2)
+                {
+                    unsigned int offset;
+                    if (info->opcodes[i].info)
+                        offset = info->opcodes[i].offset;
+                    else
+                        offset = (info->opcodes[i+1].info << 8) + info->opcodes[i+1].offset;
+                    TRACE("epilog %p-%p\n", (char *)base + function->EndAddress - offset,
+                            (char *)base + function->EndAddress - offset + info->opcodes[i].offset );
+                    i += 1;
+                    break;
+                }
             default:
                 FIXME( "unknown code %u\n", info->opcodes[i].code );
                 break;
@@ -3669,6 +3683,7 @@ static int get_opcode_size( struct opcode op )
         return 2 + (op.info != 0);
     case UWOP_SAVE_NONVOL:
     case UWOP_SAVE_XMM128:
+    case UWOP_EPILOG:
         return 2;
     case UWOP_SAVE_NONVOL_FAR:
     case UWOP_SAVE_XMM128_FAR:
@@ -3904,6 +3919,9 @@ PVOID WINAPI RtlVirtualUnwind( ULONG type, ULONG64 base, ULONG64 pc,
             case UWOP_PUSH_MACHFRAME:
                 FIXME( "PUSH_MACHFRAME %u\n", info->opcodes[i].info );
                 break;
+            case UWOP_EPILOG:
+                if (info->version == 2)
+                    break; /* nothing to do */
             default:
                 FIXME( "unknown code %u\n", info->opcodes[i].code );
                 break;




More information about the wine-cvs mailing list