mirror of
https://github.com/reactos/reactos.git
synced 2025-05-12 13:58:16 +00:00
[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:
parent
710c080147
commit
5768b7b75c
5 changed files with 13 additions and 13 deletions
|
@ -15,7 +15,6 @@ if(NOT CMAKE_CROSSCOMPILING)
|
||||||
compat.c
|
compat.c
|
||||||
dbghelp.c
|
dbghelp.c
|
||||||
dwarf.c
|
dwarf.c
|
||||||
elf_module.c
|
|
||||||
module.c
|
module.c
|
||||||
pe_module.c
|
pe_module.c
|
||||||
source.c
|
source.c
|
||||||
|
|
|
@ -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
|
* File elf.c - processing of ELF files
|
||||||
*
|
*
|
||||||
|
@ -50,7 +41,6 @@
|
||||||
#include "wine/library.h"
|
#include "wine/library.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
#endif /* __REACTOS__ */
|
|
||||||
|
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,7 @@ struct image_section_map
|
||||||
BOOL image_check_alternate(struct image_file_map* fmap, const struct module* module) DECLSPEC_HIDDEN;
|
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 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
|
struct image_file_map_ops
|
||||||
{
|
{
|
||||||
|
|
|
@ -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)
|
static BOOL image_check_debug_link(const WCHAR* file, struct image_file_map* fmap, DWORD link_crc)
|
||||||
{
|
{
|
||||||
|
DWORD read_bytes;
|
||||||
HANDLE handle;
|
HANDLE handle;
|
||||||
#ifndef DBGHELP_STATIC_LIB
|
#ifndef DBGHELP_STATIC_LIB
|
||||||
WCHAR *path;
|
WCHAR *path;
|
||||||
#endif
|
#endif
|
||||||
|
WORD magic;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
#ifndef DBGHELP_STATIC_LIB
|
#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);
|
CloseHandle(handle);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,4 +4,4 @@ files:
|
||||||
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
||||||
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
||||||
tags:
|
tags:
|
||||||
wine: 0dd495868846f30d9bb8f15f389d2b1ff6f383cb
|
wine: 2642f43eabe6c61341daee24487372b57723894d
|
||||||
|
|
Loading…
Reference in a new issue