[WINESYNC] dbghelp: Support PE debug link files.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 2642f43eabe6c61341daee24487372b57723894d by Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
winesync 2020-09-11 17:10:37 +02:00 committed by Jérôme Gardou
parent 710c080147
commit 5768b7b75c
5 changed files with 13 additions and 13 deletions

View file

@ -15,7 +15,6 @@ if(NOT CMAKE_CROSSCOMPILING)
compat.c
dbghelp.c
dwarf.c
elf_module.c
module.c
pe_module.c
source.c

View file

@ -1,12 +1,3 @@
#ifdef __REACTOS__
#ifdef DBGHELP_STATIC_LIB
#undef __ELF__
#include "compat.h"
#else
#endif
#include "dbghelp_private.h"
#include "image_private.h"
#else
/*
* File elf.c - processing of ELF files
*
@ -50,7 +41,6 @@
#include "wine/library.h"
#include "wine/debug.h"
#include "wine/heap.h"
#endif /* __REACTOS__ */
#ifdef __ELF__

View file

@ -142,6 +142,7 @@ struct image_section_map
BOOL image_check_alternate(struct image_file_map* fmap, const struct module* module) DECLSPEC_HIDDEN;
BOOL elf_map_handle(HANDLE handle, struct image_file_map* fmap) DECLSPEC_HIDDEN;
BOOL pe_map_file(HANDLE file, struct image_file_map* fmap, enum module_type mt) DECLSPEC_HIDDEN;
struct image_file_map_ops
{

View file

@ -561,10 +561,12 @@ static BOOL refresh_module_list(struct process* pcs)
static BOOL image_check_debug_link(const WCHAR* file, struct image_file_map* fmap, DWORD link_crc)
{
DWORD read_bytes;
HANDLE handle;
#ifndef DBGHELP_STATIC_LIB
WCHAR *path;
#endif
WORD magic;
BOOL ret;
#ifndef DBGHELP_STATIC_LIB
@ -587,7 +589,15 @@ static BOOL image_check_debug_link(const WCHAR* file, struct image_file_map* fma
}
}
ret = elf_map_handle(handle, fmap);
SetFilePointer(handle, 0, 0, FILE_BEGIN);
if (ReadFile(handle, &magic, sizeof(magic), &read_bytes, NULL) && magic == IMAGE_DOS_SIGNATURE)
ret = pe_map_file(handle, fmap, DMT_PE);
else
#ifndef __REACTOS__
ret = elf_map_handle(handle, fmap);
#else
ret = FALSE;
#endif
CloseHandle(handle);
return ret;
}

View file

@ -4,4 +4,4 @@ files:
include/dbghelp.h: sdk/include/psdk/dbghelp.h
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
tags:
wine: 0dd495868846f30d9bb8f15f389d2b1ff6f383cb
wine: 2642f43eabe6c61341daee24487372b57723894d