ReactOS  0.4.13-dev-982-g9853eab
rsym64.h
Go to the documentation of this file.
1 #pragma once
2 
3 //C_ASSERT(sizeof(ULONG) == 4);
4 typedef unsigned char UBYTE;
5 #if defined(_MSC_VER) || defined(__MINGW32__)
6 typedef unsigned __int64 ULONG64;
7 #else
8 #include <stdint.h>
9 typedef uint64_t ULONG64;
10 #endif
11 
12 
13 #define IMAGE_FILE_MACHINE_I386 0x14c
14 #define IMAGE_FILE_MACHINE_AMD64 0x8664
15 #define IMAGE_DIRECTORY_ENTRY_IMPORT 1
16 #define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
17 
18 #define UWOP_PUSH_NONVOL 0
19 #define UWOP_ALLOC_LARGE 1
20 #define UWOP_ALLOC_SMALL 2
21 #define UWOP_SET_FPREG 3
22 #define UWOP_SAVE_NONVOL 4
23 #define UWOP_SAVE_NONVOL_FAR 5
24 #define UWOP_SAVE_XMM 6
25 #define UWOP_SAVE_XMM_FAR 7
26 #define UWOP_SAVE_XMM128 8
27 #define UWOP_SAVE_XMM128_FAR 9
28 #define UWOP_PUSH_MACHFRAME 10
29 
30 #define REG_RAX 0
31 #define REG_RCX 1
32 #define REG_RDX 2
33 #define REG_RBX 3
34 #define REG_RSP 4
35 #define REG_RBP 5
36 #define REG_RSI 6
37 #define REG_RDI 7
38 #define REG_R8 8
39 #define REG_R9 9
40 #define REG_R10 10
41 #define REG_R11 11
42 #define REG_R12 12
43 #define REG_R13 13
44 #define REG_R14 14
45 #define REG_R15 15
46 
47 #define REG_XMM0 0
48 #define REG_XMM1 1
49 #define REG_XMM2 2
50 #define REG_XMM3 3
51 #define REG_XMM4 4
52 #define REG_XMM5 5
53 #define REG_XMM6 6
54 #define REG_XMM7 7
55 #define REG_XMM8 8
56 #define REG_XMM9 9
57 #define REG_XMM10 10
58 #define REG_XMM11 11
59 #define REG_XMM12 12
60 #define REG_XMM13 13
61 #define REG_XMM14 14
62 #define REG_XMM15 15
63 
64 
65 typedef struct _IMAGE_IMPORT_DESCRIPTOR
66 {
67  union {
70  };
73  DWORD Name;
76 
77 typedef struct _IMAGE_THUNK_DATA64
78 {
79  union {
84  } u1;
86 
87 typedef struct _RUNTIME_FUNCTION
88 {
93 
94 typedef union _UNWIND_CODE
95 {
96  struct
97  {
99  UBYTE UnwindOp:4;
100  UBYTE OpInfo:4;
101  };
104 
105 enum
106 {
110 };
111 
112 typedef struct _UNWIND_INFO
113 {
114  UBYTE Version:3;
115  UBYTE Flags:5;
119  UBYTE FrameOffset:4;
121 /* union {
122  OPTIONAL ULONG ExceptionHandler;
123  OPTIONAL ULONG FunctionEntry;
124  };
125  OPTIONAL ULONG ExceptionData[];
126 */
128 
129 typedef struct _C_SCOPE_TABLE_ENTRY
130 {
136 
137 typedef struct _C_SCOPE_TABLE
138 {
142 
143 
144 typedef struct
145 {
147  char *pName;
148  void *p;
150 } SECTION;
151 
152 typedef struct
153 {
154  char* FilePtr;
155  size_t cbInFileSize;
157 
158  /* PE data pointers */
166  void *Symbols;
167  char *Strings;
170  char *UseSection;
171 
172  /* Sections */
175 
179 
180  char *AlignBuf;
181 
185 
void * p
Definition: rsym64.h:148
char * FilePtr
Definition: rsym64.h:154
union _UNWIND_CODE UNWIND_CODE
struct _IMAGE_THUNK_DATA64 * PIMAGE_THUNK_DATA64
struct _UNWIND_INFO * PUNWIND_INFO
BYTE FrameOffset
Definition: cpu_x86_64.c:67
ULONG Target
Definition: rsym64.h:134
struct _FILE_INFO FILE_INFO
struct FILE_INFO * PFILE_INFO
SECTION eh_frame
Definition: rsym64.h:176
ULONG NewSectionHeaderSize
Definition: rsym64.h:164
ULONG64 ImageBase
Definition: rsym64.h:168
BYTE UnwindOp
Definition: cpu_x86_64.c:54
struct _UNWIND_INFO UNWIND_INFO
struct _C_SCOPE_TABLE * PC_SCOPE_TABLE
ULONG cScopes
Definition: rsym64.h:184
struct _C_SCOPE_TABLE C_SCOPE_TABLE
char * AlignBuf
Definition: rsym64.h:180
ULONG FunctionEnd
Definition: rsym64.h:90
ULONG cUWOP
Definition: rsym64.h:183
PIMAGE_OPTIONAL_HEADER64 OptionalHeader
Definition: rsym64.h:161
BYTE CodeOffset
Definition: cpu_x86_64.c:53
ULONGLONG AddressOfData
Definition: ntimage.h:505
PIMAGE_SECTION_HEADER NewSectionHeaders
Definition: rsym64.h:163
union _IMAGE_THUNK_DATA64::@2052 u1
struct _SECTION SECTION
void * Symbols
Definition: rsym64.h:166
SECTION xdata
Definition: rsym64.h:178
SECTION pdata
Definition: rsym64.h:177
BYTE Version
Definition: cpu_x86_64.c:62
BYTE FrameRegister
Definition: cpu_x86_64.c:66
uint64_t ULONGLONG
Definition: typedefs.h:65
ULONG End
Definition: rsym64.h:132
size_t cbNewFileSize
Definition: rsym64.h:156
unsigned long DWORD
Definition: ntddk_ex.h:95
uint64_t ULONG64
Definition: rsym64.h:9
ULONGLONG Function
Definition: ntimage.h:503
struct _RUNTIME_FUNCTION RUNTIME_FUNCTION
unsigned char UBYTE
Definition: lzx.c:48
struct _RUNTIME_FUNCTION * PRUNTIME_FUNCTION
unsigned __int64 ULONG64
Definition: imports.h:198
PIMAGE_FILE_HEADER FileHeader
Definition: rsym64.h:160
char * pName
Definition: rsym64.h:147
size_t cbInFileSize
Definition: rsym64.h:155
struct _IMAGE_IMPORT_DESCRIPTOR IMAGE_IMPORT_DESCRIPTOR
UNWIND_CODE UnwindCode[1]
Definition: cpu_x86_64.c:68
struct _IMAGE_IMPORT_DESCRIPTOR * PIMAGE_IMPORT_DESCRIPTOR
BYTE SizeOfProlog
Definition: cpu_x86_64.c:64
USHORT FrameOffset
Definition: cpu_x86_64.c:57
UINT64 uint64_t
Definition: types.h:77
unsigned short USHORT
Definition: pedump.c:61
ULONG NumEntries
Definition: rsym64.h:139
IMAGE_SECTION_HEADER * psh
Definition: rsym64.h:146
ULONG HeaderSize
Definition: rsym64.h:169
union _UNWIND_CODE * PUNWIND_CODE
ULONG idx
Definition: rsym64.h:149
PIMAGE_SECTION_HEADER SectionHeaders
Definition: rsym64.h:162
struct _IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA64
ULONG FunctionStart
Definition: rsym64.h:89
unsigned char UBYTE
Definition: rsym64.h:4
PIMAGE_DOS_HEADER DosHeader
Definition: rsym64.h:159
ULONG UsedSections
Definition: rsym64.h:174
unsigned int ULONG
Definition: retypes.h:1
char * UseSection
Definition: rsym64.h:170
Definition: rsym64.h:129
ULONG cFuncs
Definition: rsym64.h:182
ULONG UnwindInfo
Definition: rsym64.h:91
ULONGLONG ForwarderString
Definition: ntimage.h:502
PIMAGE_BASE_RELOCATION Relocations
Definition: rsym64.h:165
ULONG AllSections
Definition: rsym64.h:173
char * Strings
Definition: rsym64.h:167
ULONGLONG Ordinal
Definition: ntimage.h:504
ULONG Begin
Definition: rsym64.h:131
base of all file and directory entries
Definition: entries.h:82
BYTE CountOfCodes
Definition: cpu_x86_64.c:65
#define __int64
Definition: basetyps.h:16
ULONG Handler
Definition: rsym64.h:133
struct _C_SCOPE_TABLE_ENTRY C_SCOPE_TABLE_ENTRY
struct _C_SCOPE_TABLE_ENTRY * PC_SCOPE_TABLE_ENTRY