Also add enums for interpreting some fields in the arm64 pdata.

These have been present in WinSDK since 10.0.19041.0.

Curiously, there's no similar structs for interpreting
the ARM xdata (but the format is well documented, just like
for ARM64).

Signed-off-by: Martin Storsjö <[email protected]>
---
 mingw-w64-headers/include/winnt.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/mingw-w64-headers/include/winnt.h 
b/mingw-w64-headers/include/winnt.h
index e76e302fe..257efdc1b 100644
--- a/mingw-w64-headers/include/winnt.h
+++ b/mingw-w64-headers/include/winnt.h
@@ -8498,6 +8498,19 @@ 
DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS)
       } DUMMYUNIONNAME;
     } IMAGE_ARM_RUNTIME_FUNCTION_ENTRY,*PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY;
 
+    typedef enum ARM64_FNPDATA_FLAGS {
+      PdataRefToFullXdata = 0,
+      PdataPackedUnwindFunction = 1,
+      PdataPackedUnwindFragment = 2,
+    } ARM64_FNPDATA_FLAGS;
+
+    typedef enum ARM64_FNPDATA_CR {
+      PdataCrUnchained = 0,
+      PdataCrUnchainedSavedLr = 1,
+      PdataCrChainedWithPac = 2,
+      PdataCrChained = 3,
+    } ARM64_FNPDATA_CR;
+
     typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY {
       DWORD BeginAddress;
       __C89_NAMELESS union {
@@ -8514,6 +8527,18 @@ 
DEFINE_ENUM_FLAG_OPERATORS(JOB_OBJECT_IO_RATE_CONTROL_FLAGS)
       } DUMMYUNIONNAME;
     } IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY,*PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY;
 
+    typedef union IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY_XDATA {
+      DWORD HeaderData;
+      __C89_NAMELESS struct {
+        DWORD FunctionLength : 18;
+        DWORD Version : 2;
+        DWORD ExceptionDataPresent : 1;
+        DWORD EpilogInHeader : 1;
+        DWORD EpilogCount : 5;
+        DWORD CodeWords : 5;
+      } DUMMYSTRUCTNAME;
+    } IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY_XDATA;
+
     typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
       DWORD BeginAddress;
       DWORD EndAddress;
-- 
2.34.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to