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