23#include "../../dll/win32/dbghelp/compat.h"
34#define MAX_SYM_NAME 2000
53 unsigned int val = 5381;
72 entry->String = StringPtr;
82 char *
Start = StringsBase;
83 char *End = StringsBase + StringsLength;
142 ULONG *StabSymbolsLength,
void **StabSymbolsBase,
143 ULONG *StabStringsLength,
void **StabStringsBase)
148 *StabSymbolsBase =
NULL;
149 *StabSymbolsLength = 0;
150 *StabStringsBase =
NULL;
151 *StabStringsLength = 0;
156 if ((
strncmp((
char *) PESectionHeaders[Idx].
Name,
".stab", 5) == 0)
157 && (PESectionHeaders[Idx].
Name[5] == 0))
165 if (
strncmp((
char *) PESectionHeaders[Idx].
Name,
".stabstr", 8) == 0)
180 ULONG *CoffSymbolsLength,
void **CoffSymbolsBase,
181 ULONG *CoffStringsLength,
void **CoffStringsBase)
187 *CoffSymbolsLength = 0;
188 *CoffStringsLength = 0;
194 *CoffStringsLength = *((
ULONG *) ((
char *) *CoffSymbolsBase + *CoffSymbolsLength));
195 *CoffStringsBase = (
void *)((
char *) *CoffSymbolsBase + *CoffSymbolsLength);
204 ULONG *StringsLength,
215 return entry->Offset;
219 char *End = (
char *)StringsBase + *StringsLength;
221 strcpy(End, StringToFind);
222 *StringsLength +=
strlen(StringToFind) + 1;
226 return End - (
char *)StringsBase;
232 ULONG *StringsLength,
void *StringsBase,
233 ULONG StabSymbolsLength,
void *StabSymbolsBase,
234 ULONG StabStringsLength,
void *StabStringsBase,
248 StabEntry = StabSymbolsBase;
260 if (*SymbolsBase ==
NULL)
262 fprintf(
stderr,
"Failed to allocate memory for converted .stab symbols\n");
265 Current = *SymbolsBase;
266 memset(Current, 0,
sizeof(*Current));
270 LastFunctionAddress = 0;
273 if (LastFunctionAddress == 0)
281 switch (StabEntry[
i].n_type)
286 Name = (
char *) StabStringsBase + StabEntry[
i].n_strx;
287 if (StabStringsLength < StabEntry[
i].n_strx
290 || StabEntry[
i].
n_value < ImageBase)
298 memset(++Current, 0,
sizeof(*Current));
306 (
char *)StabStringsBase + StabEntry[
i].n_strx,
311 if (StabEntry[
i].n_desc == 0 || StabEntry[
i].n_value < ImageBase)
313 LastFunctionAddress = 0;
319 memset(++Current, 0,
sizeof(*Current));
325 Name = (
char *)StabStringsBase + StabEntry[
i].n_strx;
347 memset(++Current, 0,
sizeof(*Current));
361 *SymbolsCount = (Current - *SymbolsBase + 1);
372 ULONG *StringsLength,
void *StringsBase,
373 ULONG CoffSymbolsLength,
void *CoffSymbolsBase,
374 ULONG CoffStringsLength,
void *CoffStringsBase,
389 if (*SymbolsBase ==
NULL)
391 fprintf(
stderr,
"Unable to allocate memory for converted COFF symbols\n");
395 Current = *SymbolsBase;
401 if (
ISFCN(CoffEntry[
i].e_type) ||
C_EXT == CoffEntry[
i].e_sclass)
404 if (CoffEntry[
i].e_scnum > 0)
410 "Invalid section number %d in COFF symbols (only %d sections present)\n",
411 CoffEntry[
i].e_scnum,
418 if (CoffEntry[
i].
e.e.e_zeroes == 0)
420 if (
sizeof(
FuncName) <=
strlen((
char *) CoffStringsBase + CoffEntry[
i].
e.e.e_offset))
447 memset(++Current, 0,
sizeof(*Current));
453 *SymbolsCount = (Current - *SymbolsBase + 1);
505 char **tabEnt = tab->
Table[bucket];
515 return (
i << 10) | bucket;
524 newBucket =
realloc(tab->
Table[bucket], (
i+2) *
sizeof(
char *));
532 tab->
Table[bucket] = newBucket;
533 tab->
Table[bucket][
i+1] = 0;
535 return (
i << 10) | bucket;
542 int bucket =
id & 0x3ff;
543 return tab->
Table[bucket][
i];
550 int pclen =
strlen(PathChop);
566 int fileId, functionId;
568 if (!pSymbol)
return FALSE;
642 ULONG *StringsLength,
void **StringsBase)
653 strtab.
Table =
calloc(1024,
sizeof(
const char **));
665 *StringsLength = strtab.
Bytes;
675 char *toFree = strtab.
Table[
i][
j];
678 strings_copy +=
strlen(strings_copy) + 1;
690 rossym = &(*SymbolsBase)[
i];
723 ULONG StabFunctionStringOffset, NewStabFunctionStringOffset, CoffFunctionStringOffset;
726 *MergedSymbolCount = 0;
727 if (StabSymbolsCount == 0)
729 *MergedSymbols =
NULL;
732 *MergedSymbols =
malloc((StabSymbolsCount + CoffSymbolsCount) *
sizeof(
ROSSYM_ENTRY));
733 if (*MergedSymbols ==
NULL)
735 fprintf(
stderr,
"Unable to allocate memory for merged symbols\n");
739 StabFunctionStartAddress = 0;
740 StabFunctionStringOffset = 0;
741 CoffFunctionStringOffset = 0;
742 CoffFunctionSymbol =
NULL;
744 for (StabIndex = 0; StabIndex < StabSymbolsCount; StabIndex++)
746 (*MergedSymbols)[*MergedSymbolCount] = StabSymbols[StabIndex];
747 for (
j = StabIndex + 1;
748 j < StabSymbolsCount && StabSymbols[
j].
Address == StabSymbols[StabIndex].
Address;
755 if (StabSymbols[
j].FunctionOffset != 0 && (*MergedSymbols)[*MergedSymbolCount].FunctionOffset == 0)
757 (*MergedSymbols)[*MergedSymbolCount].FunctionOffset = StabSymbols[
j].
FunctionOffset;
759 if (StabSymbols[
j].SourceLine != 0 && (*MergedSymbols)[*MergedSymbolCount].SourceLine == 0)
761 (*MergedSymbols)[*MergedSymbolCount].SourceLine = StabSymbols[
j].
SourceLine;
766 while (CoffIndex < CoffSymbolsCount &&
767 CoffSymbols[CoffIndex].
Address <= (*MergedSymbols)[*MergedSymbolCount].
Address)
769 if (CoffSymbols[CoffIndex].FunctionOffset != 0)
771 CoffFunctionSymbol = &CoffSymbols[CoffIndex];
776 NewStabFunctionStringOffset = (*MergedSymbols)[*MergedSymbolCount].FunctionOffset;
777 if (CoffFunctionSymbol &&
778 CoffFunctionSymbol->
Address <= (*MergedSymbols)[*MergedSymbolCount].Address &&
779 StabFunctionStartAddress < CoffFunctionSymbol->
Address)
781 (*MergedSymbols)[*MergedSymbolCount].FunctionOffset = CoffFunctionStringOffset;
784 if (StabFunctionStringOffset != NewStabFunctionStringOffset)
786 StabFunctionStartAddress = (*MergedSymbols)[*MergedSymbolCount].Address;
788 StabFunctionStringOffset = NewStabFunctionStringOffset;
789 (*MergedSymbolCount)++;
792 for (CoffIndex = 0; CoffIndex < CoffSymbolsCount; CoffIndex++)
794 if (CoffSymbols[CoffIndex].
Address &&
795 CoffSymbols[CoffIndex].FunctionOffset)
797 (*MergedSymbols)[*MergedSymbolCount] = CoffSymbols[CoffIndex];
798 (*MergedSymbolCount)++;
812 for (Section = 0; Section < NumberOfSections; Section++)
817 return SectionHeaders + Section;
837 *ProcessedRelocsLength = 0;
838 *ProcessedRelocs =
NULL;
843 NumberOfSections, SectionHeaders);
844 if (RelocSectionHeader ==
NULL)
846 fprintf(
stderr,
"Can't find section header for relocation data\n");
851 if (*ProcessedRelocs ==
NULL)
854 "Failed to allocate %u bytes for relocations\n",
858 *ProcessedRelocsLength = 0;
867 while (BaseReloc < End && BaseReloc->SizeOfBlock > 0)
872 if (TargetSectionHeader !=
NULL)
874 AcceptedRelocs = *ProcessedRelocs;
877 *ProcessedRelocsLength)
887 memcpy((
char *) *ProcessedRelocs + *ProcessedRelocsLength,
902 if (SectionTitle[0] ==
'/')
915 ULONG RosSymLength,
void *RosSymSection)
917 ULONG StartOfRawData;
919 void *OutHeader, *ProcessedRelocs, *PaddedRosSym, *
Data;
920 unsigned char *PaddedStringTable;
927 ULONG ProcessedRelocsLength;
928 ULONG RosSymOffset, RosSymFileLength;
929 ULONG PaddedStringTableLength;
930 int InRelocSectionIndex;
933 char *StringTable = (
char *)InData +
935 ULONG StringTableLength = 0;
936 ULONG StringTableLocation;
942 InSectionHeaders[Section].
Name);
943 if (InSectionHeaders[Section].
Name[0] ==
'/')
945 StringTableLength =
atoi((
const char *)InSectionHeaders[Section].
Name + 1) +
946 strlen((
const char *)SectionName) + 1;
948 if ((StartOfRawData == 0 || InSectionHeaders[Section].PointerToRawData < StartOfRawData)
949 && InSectionHeaders[Section].PointerToRawData != 0
950 && (
strncmp((
char *) SectionName,
".stab", 5)) != 0
951 && (
strncmp((
char *) SectionName,
".debug_", 7)) != 0)
956 OutHeader =
malloc(StartOfRawData);
957 if (OutHeader ==
NULL)
960 "Failed to allocate %u bytes for output file header\n",
961 (
unsigned int)StartOfRawData);
964 memset(OutHeader,
'\0', StartOfRawData);
994 InRelocSectionIndex = -1;
1003 CurrentSectionHeader = OutSectionHeaders;
1006 OutRelocSection =
NULL;
1008 StringTableLocation = StartOfRawData;
1013 InSectionHeaders[Section].
Name);
1014 if ((
strncmp((
char *) SectionName,
".stab", 5) != 0) &&
1015 (
strncmp((
char *) SectionName,
".debug_", 7)) != 0)
1017 *CurrentSectionHeader = InSectionHeaders[Section];
1027 if (RosSymOffset < CurrentSectionHeader->PointerToRawData + CurrentSectionHeader->
SizeOfRawData)
1031 if (Section == (
ULONG)InRelocSectionIndex)
1033 OutRelocSection = CurrentSectionHeader;
1037 CurrentSectionHeader++;
1041 if (OutRelocSection == CurrentSectionHeader - 1)
1064 if (RosSymLength > 0)
1067 memcpy(CurrentSectionHeader->
Name,
".rossym", 8);
1082 PaddedRosSym =
malloc(RosSymFileLength);
1083 if (PaddedRosSym ==
NULL)
1086 "Failed to allocate %u bytes for padded .rossym\n",
1087 (
unsigned int)RosSymFileLength);
1090 memcpy(PaddedRosSym, RosSymSection, RosSymLength);
1091 memset((
char *) PaddedRosSym + RosSymLength,
1093 RosSymFileLength - RosSymLength);
1096 StringTableLocation = RosSymOffset + RosSymFileLength;
1100 PaddedRosSym =
NULL;
1104 if (StringTableLength)
1111 for (
i = 0;
i < StartOfRawData / 2;
i++)
1113 CheckSum += ((
unsigned short*) OutHeader)[
i];
1114 CheckSum = 0xffff & (CheckSum + (CheckSum >> 16));
1119 DWORD SizeOfRawData;
1120 if (OutRelocSection == OutSectionHeaders + Section)
1122 Data = (
void *) ProcessedRelocs;
1123 SizeOfRawData = ProcessedRelocsLength;
1125 else if (RosSymLength > 0 && Section + 1 == OutFileHeader->
NumberOfSections)
1127 Data = (
void *) PaddedRosSym;
1135 for (
i = 0;
i < SizeOfRawData / 2;
i++)
1137 CheckSum += ((
unsigned short*)
Data)[
i];
1138 CheckSum = 0xffff & (CheckSum + (CheckSum >> 16));
1147 int PaddingSize = PaddingFrom ? OutOptHeader->
FileAlignment - PaddingFrom : 0;
1149 PaddedStringTableLength = StringTableLength + PaddingSize;
1150 PaddedStringTable =
malloc(PaddedStringTableLength);
1152 assert(
sizeof(StringTableLength) == 4);
1153 memcpy(PaddedStringTable, &StringTableLength,
sizeof(StringTableLength));
1157 memcpy(PaddedStringTable + 4, StringTable + 4, StringTableLength - 4);
1158 memset(PaddedStringTable + StringTableLength, 0, PaddingSize);
1161 for (
i = 0;
i < PaddedStringTableLength / 2;
i++)
1163 CheckSum += ((
unsigned short*)PaddedStringTable)[
i];
1164 CheckSum = 0xffff & (CheckSum + (CheckSum >> 16));
1166 Length += PaddedStringTableLength;
1170 PaddedStringTable =
NULL;
1176 if (
fwrite(OutHeader, 1, StartOfRawData, OutFile) != StartOfRawData)
1178 perror(
"Error writing output header\n");
1185 if (OutSectionHeaders[Section].SizeOfRawData != 0)
1187 DWORD SizeOfRawData;
1188 fseek(OutFile, OutSectionHeaders[Section].PointerToRawData,
SEEK_SET);
1189 if (OutRelocSection == OutSectionHeaders + Section)
1191 Data = (
void *) ProcessedRelocs;
1192 SizeOfRawData = ProcessedRelocsLength;
1194 else if (RosSymLength > 0 && Section + 1 == OutFileHeader->
NumberOfSections)
1196 Data = (
void *) PaddedRosSym;
1204 if (
fwrite(
Data, 1, SizeOfRawData, OutFile) != SizeOfRawData)
1206 perror(
"Error writing section data\n");
1214 if (PaddedStringTable)
1217 fwrite(PaddedStringTable, 1, PaddedStringTableLength, OutFile);
1218 free(PaddedStringTable);
1240 void *StabStringBase;
1241 ULONG StabStringsLength;
1242 void *CoffBase =
NULL;
1244 void *CoffStringBase =
NULL;
1245 ULONG CoffStringsLength;
1249 void *StringBase =
NULL;
1250 ULONG StringsLength = 0;
1251 ULONG StabSymbolsCount = 0;
1253 ULONG CoffSymbolsCount = 0;
1255 ULONG MergedSymbolsCount = 0;
1260 void *RosSymSection;
1263 char elfhdr[4] = {
'\177',
'E',
'L',
'F' };
1265 int arg, argstate = 0;
1303 fprintf(
stderr,
"Usage: rsym [-s <sources>] <input> <output>\n");
1322 if (!
memcmp(PEDosHeader, elfhdr,
sizeof(elfhdr)))
1324 perror(
"Input file is not a PE image.\n");
1353 if (StabsLength == 0)
1396 StringBase =
malloc(1 + StringsLength + CoffStringsLength +
1398 if (StringBase ==
NULL)
1401 fprintf(
stderr,
"Failed to allocate memory for strings table\n");
1405 *((
char *) StringBase) =
'\0';
1422 fprintf(
stderr,
"Failed to allocate memory for strings table\n");
1428 StringBase =
realloc(StringBase, StringsLength + CoffStringsLength);
1432 fprintf(
stderr,
"Failed to allocate memory for strings table\n");
1486 if (MergedSymbolsCount == 0)
1489 RosSymSection =
NULL;
1497 RosSymSection =
malloc(RosSymLength);
1498 if (RosSymSection ==
NULL)
1500 free(MergedSymbols);
1503 fprintf(
stderr,
"Unable to allocate memory for .rossym section\n");
1506 memset(RosSymSection,
'\0', RosSymLength);
1523 free(MergedSymbols);
1530 perror(
"Cannot open output file");
1531 free(RosSymSection);
1548 free(RosSymSection);
1557 free(RosSymSection);
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strcpy(char *DstString, const char *SrcString)
static FILEDATA FileData[MAX_FDS]
_In_ PFCB _In_ LONGLONG FileOffset
BOOL WINAPI SymFromAddr(HANDLE hProcess, DWORD64 Address, DWORD64 *Displacement, PSYMBOL_INFO Symbol)
BOOL WINAPI SymUnloadModule(HANDLE hProcess, DWORD BaseOfDll)
BOOL WINAPI SymCleanup(HANDLE hProcess)
BOOL WINAPI SymInitialize(HANDLE hProcess, PCSTR UserSearchPath, BOOL fInvadeProcess)
@ SYMOPT_EX_WINE_NATIVE_MODULES
struct _SYMBOL_INFO SYMBOL_INFO
BOOL WINAPI SymSetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option, BOOL value)
BOOL WINAPI SymEnumLines(HANDLE hProcess, ULONG64 base, PCSTR compiland, PCSTR srcfile, PSYM_ENUMLINES_CALLBACK cb, PVOID user)
DWORD WINAPI SymSetOptions(DWORD opts)
DWORD WINAPI SymLoadModule(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, PCSTR ModuleName, DWORD BaseOfDll, DWORD SizeOfDll)
static UINT load_file(MSIRECORD *row, LPVOID param)
#define ROUND_UP(n, align)
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
struct _IMAGE_FILE_HEADER * PIMAGE_FILE_HEADER
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
GLsizei const GLchar *const * strings
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fseek(_Inout_ FILE *_File, _In_ long _Offset, _In_ int _Origin)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
macro IMPORT Name endm macro EXPORT Name global &Name endm macro TEXTAREA section rx align endm macro DATAAREA section rw endm macro RODATAAREA section rw endm macro NESTED_ENTRY Name FuncName equ &Name PrologName equ &Name &_Prolog FuncEndName equ &Name &_end global &FuncName align func &FuncName & FuncName
#define memcpy(s1, s2, n)
static const WCHAR path1[]
static const WCHAR path2[]
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
struct _IMAGE_BASE_RELOCATION * PIMAGE_BASE_RELOCATION
#define IMAGE_SCN_MEM_DISCARDABLE
#define IMAGE_SCN_MEM_READ
#define IMAGE_SCN_TYPE_NOLOAD
#define IMAGE_SCN_LNK_REMOVE
#define IMAGE_FILE_LOCAL_SYMS_STRIPPED
struct _IMAGE_SECTION_HEADER * PIMAGE_SECTION_HEADER
#define IMAGE_DIRECTORY_ENTRY_BASERELOC
#define IMAGE_FILE_DEBUG_STRIPPED
struct _IMAGE_OPTIONAL_HEADER * PIMAGE_OPTIONAL_HEADER
#define IMAGE_FILE_LINE_NUMS_STRIPPED
char * convert_path(char *origpath)
struct _ROSSYM_ENTRY ROSSYM_ENTRY
struct _SYMBOLFILE_HEADER * PSYMBOLFILE_HEADER
struct _SYMBOLFILE_HEADER SYMBOLFILE_HEADER
struct _COFF_SYMENT COFF_SYMENT
struct _COFF_SYMENT * PCOFF_SYMENT
struct _STAB_ENTRY STAB_ENTRY
static DWORD StringHash(const WCHAR *str)
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
_Check_return_ _CRTIMP size_t __cdecl strcspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
struct DbgHelpLineEntry * lastLineEntry
struct DbgHelpLineEntry * LineEntryData
struct StringEntry * Next
struct StringEntry ** Table
CHAR FileName[MAX_PATH+1]
#define FIELD_OFFSET(t, f)
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress