dbghelp: Support PE debug link files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0dd4958688
commit
2642f43eab
|
@ -136,6 +136,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
|
||||
{
|
||||
|
|
|
@ -540,8 +540,10 @@ 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;
|
||||
WCHAR *path;
|
||||
WORD magic;
|
||||
BOOL ret;
|
||||
|
||||
path = get_dos_file_name(file);
|
||||
|
@ -560,6 +562,10 @@ static BOOL image_check_debug_link(const WCHAR* file, struct image_file_map* fma
|
|||
}
|
||||
}
|
||||
|
||||
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
|
||||
ret = elf_map_handle(handle, fmap);
|
||||
CloseHandle(handle);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue