Commit c508772a authored by Sergey Turchanov's avatar Sergey Turchanov Committed by Alexandre Julliard

Fix for files which do not contain exports (fg, EXE) to get processed

for debug information.
parent 9cf066e3
...@@ -838,7 +838,8 @@ static void DEBUG_LoadEntryPoints32( HMODULE32 hModule, const char *name ) ...@@ -838,7 +838,8 @@ static void DEBUG_LoadEntryPoints32( HMODULE32 hModule, const char *name )
dir = &PE_HEADER(hModule)->OptionalHeader. dir = &PE_HEADER(hModule)->OptionalHeader.
DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT]; DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT];
if (!dir->Size) return; if (dir->Size)
{
exports = (IMAGE_EXPORT_DIRECTORY *)RVA( dir->VirtualAddress ); exports = (IMAGE_EXPORT_DIRECTORY *)RVA( dir->VirtualAddress );
ordinals = (WORD *)RVA( exports->AddressOfNameOrdinals ); ordinals = (WORD *)RVA( exports->AddressOfNameOrdinals );
names = (const char **)RVA( exports->AddressOfNames ); names = (const char **)RVA( exports->AddressOfNames );
...@@ -863,6 +864,7 @@ static void DEBUG_LoadEntryPoints32( HMODULE32 hModule, const char *name ) ...@@ -863,6 +864,7 @@ static void DEBUG_LoadEntryPoints32( HMODULE32 hModule, const char *name )
addr.off = (DWORD)RVA( functions[i] ); addr.off = (DWORD)RVA( functions[i] );
DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC ); DEBUG_AddSymbol( buffer, &addr, NULL, SYM_WIN32 | SYM_FUNC );
} }
}
dir = &PE_HEADER(hModule)->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG]; dir = &PE_HEADER(hModule)->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG];
if (dir->Size) if (dir->Size)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment