3#ifndef SYMS_PE_PARSER_C
4#define SYMS_PE_PARSER_C
12 void *base = data.
str;
33 void *base = data.
str;
108 virt_section_align =
pe_optional.section_alignment;
120 for (
SYMS_U32 dir_idx = 0; dir_idx < data_dir_count; dir_idx += 1){
165 if (dbg_path_off > 0){
275 imp->library_name = library_name;
300 void *base = (
void*)data.
str;
384 exp->ordinal = ordinal;
416 if (
list.node_count == 2){
417 library_name =
list.first->string;
418 import_name =
list.last->string;
466 else if (
pdata->voff_first < voff){
513 if (1 <= n && n <= sec_count){
581 for (; *ptr != 0 && ptr < opl; ptr += 1);
595 for (; *ptr != 0 && ptr < opl; ptr += 1);
603 for (; i < ptr; o += 1, i += 1){
652 void *base = (
void*)data.
str;
678 void *base = (
void*)data.
str;
722 void *base = (
void *)data.
str;
735 for (; ptr < opl; ptr += 1){
773 dll->name_table = name_table;
784 void *base = (
void *)data.
str;
797 for (; ptr < opl; ptr += 1){
842 dll->name_table = name_table;
843 dll->bound_table = bound_table;
856 void *base = (
void*)data.
str;
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition syms_base.h:402
Definition syms_coff.h:54
Definition syms_debug_info.h:69
SYMS_Export * exports
Definition syms_debug_info.h:70
SYMS_U64 count
Definition syms_debug_info.h:71
Definition syms_debug_info.h:45
Definition syms_debug_info.h:119
SYMS_ExtFileNode * first
Definition syms_debug_info.h:120
SYMS_U64 node_count
Definition syms_debug_info.h:122
SYMS_ExtFileNode * last
Definition syms_debug_info.h:121
Definition syms_debug_info.h:114
SYMS_ExtFile ext_file
Definition syms_debug_info.h:116
SYMS_String8 file_name
Definition syms_debug_info.h:110
SYMS_ExtMatchKey match_key
Definition syms_debug_info.h:111
Definition syms_debug_info.h:64
SYMS_Import * imports
Definition syms_debug_info.h:65
SYMS_U64 count
Definition syms_debug_info.h:66
Definition syms_debug_info.h:39
Definition syms_pe_parser.h:15
SYMS_U64 image_base
Definition syms_pe_parser.h:17
SYMS_FileFormat format
Definition syms_pe_parser.h:16
SYMS_PeGuid dbg_guid
Definition syms_pe_parser.h:29
SYMS_B32 is_pe32
Definition syms_pe_parser.h:19
SYMS_U64 section_count
Definition syms_pe_parser.h:23
SYMS_U64 dbg_path_off
Definition syms_pe_parser.h:27
SYMS_U64Range * data_dir_franges
Definition syms_pe_parser.h:33
SYMS_U64 dbg_path_size
Definition syms_pe_parser.h:28
SYMS_U64 symbol_count
Definition syms_pe_parser.h:25
SYMS_U64 file_section_align
Definition syms_pe_parser.h:21
SYMS_U32 dbg_age
Definition syms_pe_parser.h:30
SYMS_U32 data_dir_count
Definition syms_pe_parser.h:34
SYMS_U32 dbg_time
Definition syms_pe_parser.h:31
SYMS_Arch arch
Definition syms_pe_parser.h:32
SYMS_U64 entry_point
Definition syms_pe_parser.h:18
SYMS_U64 virt_section_align
Definition syms_pe_parser.h:20
SYMS_U64 symbol_array_off
Definition syms_pe_parser.h:24
SYMS_U64 section_array_off
Definition syms_pe_parser.h:22
SYMS_U64 string_table_off
Definition syms_pe_parser.h:26
Definition syms_meta_pe.h:161
Definition syms_meta_pe.h:219
SYMS_PeDebugDirectoryType type
Definition syms_meta_pe.h:224
SYMS_U32 file_offset
Definition syms_meta_pe.h:227
SYMS_U32 export_address_table_voff
Definition syms_pe.h:135
SYMS_U32 name_voff
Definition syms_pe.h:131
SYMS_U32 ordinal_table_voff
Definition syms_pe.h:137
SYMS_U32 export_address_table_count
Definition syms_pe.h:133
SYMS_U32 ordinal_base
Definition syms_pe.h:132
SYMS_U32 name_pointer_table_voff
Definition syms_pe.h:136
SYMS_U32 name_pointer_table_count
Definition syms_pe.h:134
Definition syms_pe_parser.h:10
SYMS_U32 coff_off
Definition syms_pe_parser.h:12
SYMS_FileFormat format
Definition syms_pe_parser.h:11
Definition syms_pe_parser.h:65
SYMS_PeImportDll * import_dlls
Definition syms_pe_parser.h:66
SYMS_U64 count
Definition syms_pe_parser.h:67
Definition syms_pe_parser.h:59
Definition syms_pe_parser.h:54
SYMS_PeImportName * names
Definition syms_pe_parser.h:55
SYMS_U64 count
Definition syms_pe_parser.h:56
Definition syms_pe_parser.h:47
SYMS_U16 ordinal
Definition syms_pe_parser.h:50
SYMS_PeImportLookup lookup
Definition syms_pe_parser.h:49
SYMS_String8 name
Definition syms_pe_parser.h:48
Definition syms_debug_info.h:21
Definition syms_base.h:306
Definition syms_base.h:296
SYMS_U8 * str
Definition syms_base.h:297
SYMS_U64 size
Definition syms_base.h:298
Definition syms_base.h:243
Definition syms_base.h:238
SYMS_U64 count
Definition syms_base.h:240
SYMS_U32 * u32
Definition syms_base.h:239
Definition syms_base.h:233
SYMS_U64 * u64
Definition syms_base.h:234
SYMS_U64 count
Definition syms_base.h:235
Definition syms_base.h:264
SYMS_U64 max
Definition syms_base.h:266
SYMS_U64 min
Definition syms_base.h:265
SYMS_API SYMS_ArenaTemp syms_get_scratch(SYMS_Arena **conflicts, SYMS_U64 conflict_count)
Definition syms_base.c:694
SYMS_API SYMS_U64Range syms_make_u64_range(SYMS_U64 min, SYMS_U64 max)
Definition syms_base.c:18
SYMS_API SYMS_String8 syms_based_range_read_string(void *base, SYMS_U64Range range, SYMS_U64 offset)
Definition syms_base.c:823
SYMS_API void syms_arena_temp_end(SYMS_ArenaTemp temp)
Definition syms_base.c:689
SYMS_API SYMS_U64Range syms_make_u64_inrange(SYMS_U64Range range, SYMS_U64 offset, SYMS_U64 size)
Definition syms_base.c:24
SYMS_API SYMS_String8 syms_str8(SYMS_U8 *str, SYMS_U64 size)
Definition syms_base.c:169
SYMS_API SYMS_String8 syms_push_string_copy(SYMS_Arena *arena, SYMS_String8 string)
Definition syms_base.c:353
SYMS_API SYMS_String8List syms_string_split(SYMS_Arena *arena, SYMS_String8 input, SYMS_U32 delimiter)
Definition syms_base.c:390
SYMS_API SYMS_ArenaTemp syms_arena_temp_begin(SYMS_Arena *arena)
Definition syms_base.c:682
#define syms_true
Definition syms_base.h:105
#define SYMS_U16_MAX
Definition syms_base.h:174
#define syms_based_range_read_struct(b, r, o, p)
Definition syms_base.h:593
#define syms_push_array(a, T, c)
Definition syms_base.h:561
#define syms_memzero_struct(s)
Definition syms_base.h:161
#define SYMS_ClampTop(a, b)
Definition syms_base.h:182
#define syms_memisnull_struct(s)
Definition syms_base.h:162
#define syms_false
Definition syms_base.h:104
#define SYMS_API
Definition syms_base.h:29
#define SYMS_ARRAY_SIZE(x)
Definition syms_base.h:144
#define SYMS_ASSERT(x)
Definition syms_base.h:125
SYMS_S32 SYMS_B32
Definition syms_base.h:99
#define syms_push_array_zero(a, T, c)
Definition syms_base.h:564
SYMS_S8 SYMS_B8
Definition syms_base.h:97
#define SYMS_AlignDownPow2(a, b)
Definition syms_base.h:188
#define syms_str8_lit(s)
Definition syms_base.h:483
#define SYMS_QueuePush(f, l, n)
Definition syms_base.h:220
#define syms_release_scratch
Definition syms_base.h:567
uint32_t SYMS_U32
Definition syms_crt_overrides.h:38
uint64_t SYMS_U64
Definition syms_crt_overrides.h:39
#define syms_memmove
Definition syms_crt_overrides.h:65
#define SYMS_U64
Definition syms_crt_overrides.h:54
uint16_t SYMS_U16
Definition syms_crt_overrides.h:37
uint8_t SYMS_U8
Definition syms_crt_overrides.h:36
SYMS_READ_ONLY SYMS_GLOBAL SYMS_FileFormat syms_format_nil
Definition syms_debug_info.h:398
#define SYMS_Arena
Definition syms_default_arena.h:61
#define SYMS_CODEVIEW_PDB20_MAGIC
Definition syms_pe.h:79
#define SYMS_PE_MAGIC
Definition syms_pe.h:35
#define SYMS_CODEVIEW_PDB70_MAGIC
Definition syms_pe.h:80
#define SYMS_PE32PLUS_MAGIC
Definition syms_pe.h:37
#define SYMS_DOS_MAGIC
Definition syms_pe.h:30
#define SYMS_PE32_MAGIC
Definition syms_pe.h:36
SYMS_API SYMS_String8 syms_pe_binary_name_from_bin(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin)
Definition syms_pe_parser.c:852
SYMS_API SYMS_ImportArray syms_pe_imports_from_bin(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin)
Definition syms_pe_parser.c:234
SYMS_API void * syms_pe_ptr_from_voff(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 voff)
Definition syms_pe_parser.c:533
SYMS_API SYMS_U64 syms_pe_foff_from_voff(SYMS_CoffSectionHeader *sections, SYMS_U32 section_count, SYMS_U64 virt_off)
Definition syms_pe_parser.c:556
SYMS_API SYMS_U64 syms_pe_binary_search_intel_pdata(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 voff)
Definition syms_pe_parser.c:440
SYMS_API SYMS_ExtFileList syms_pe_ext_file_list_from_bin(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin)
Definition syms_pe_parser.c:206
SYMS_API SYMS_U64Array syms_u64_array_from_null_term_u64_string(SYMS_Arena *arena, SYMS_U64 *src, SYMS_U64 *opl)
Definition syms_pe_parser.c:578
SYMS_API SYMS_U64 syms_pe_entry_point_voff_from_bin(SYMS_PeBinAccel *bin)
Definition syms_pe_parser.c:228
SYMS_API SYMS_PeImportDllArray syms_pe_regular_imports_from_bin(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin)
Definition syms_pe_parser.c:720
SYMS_API SYMS_SecInfoArray syms_pe_sec_info_array_from_bin(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin)
Definition syms_pe_parser.c:222
SYMS_API SYMS_U64Array syms_pe_u64_array_from_null_term_addr_string(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 foff)
Definition syms_pe_parser.c:610
SYMS_API SYMS_PeImportName syms_pe_import_name_from_name_entry(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 name_entry)
Definition syms_pe_parser.c:627
SYMS_API SYMS_U64 syms_pe_sec_number_from_voff(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 voff)
Definition syms_pe_parser.c:495
SYMS_API SYMS_Arch syms_pe_arch_from_bin(SYMS_PeBinAccel *bin)
Definition syms_pe_parser.c:200
SYMS_API void * syms_pe_ptr_from_sec_number(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 n)
Definition syms_pe_parser.c:510
SYMS_API SYMS_PeBinAccel * syms_pe_bin_accel_from_file(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeFileAccel *accel)
Definition syms_pe_parser.c:31
SYMS_API void * syms_pe_ptr_from_foff(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 foff)
Definition syms_pe_parser.c:524
SYMS_API SYMS_ExportArray syms_pe_exports_from_bin(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin)
Definition syms_pe_parser.c:293
SYMS_API SYMS_PeImportDllArray syms_pe_delayed_imports_from_bin(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin)
Definition syms_pe_parser.c:780
SYMS_API SYMS_U64Array syms_u64_array_from_null_term_u32_string(SYMS_Arena *arena, SYMS_U32 *src, SYMS_U32 *opl)
Definition syms_pe_parser.c:592
SYMS_API SYMS_U64 syms_pe_bin_foff_from_voff(SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64 virt_off)
Definition syms_pe_parser.c:571
SYMS_API SYMS_PeImportNameArray syms_pe_import_name_array_from_name_entries(SYMS_Arena *arena, SYMS_String8 data, SYMS_PeBinAccel *bin, SYMS_U64Array name_entries)
Definition syms_pe_parser.c:670
SYMS_API SYMS_PeFileAccel * syms_pe_file_accel_from_data(SYMS_Arena *arena, SYMS_String8 data)
Definition syms_pe_parser.c:10
@ SYMS_PeImportLookup_NameHint
Definition syms_pe_parser.h:43
@ SYMS_PeImportLookup_Ordinal
Definition syms_pe_parser.h:42
SYMS_API SYMS_SecInfoArray syms_pecoff_sec_info_from_coff_sec(SYMS_Arena *arena, SYMS_String8 data, SYMS_U64 sec_hdrs_off, SYMS_U64 sec_count)
Definition syms_pecoff_helpers.c:86