[WINESYNC] dbghelp: Lookup real image paths in image_locate_debug_link.

Signed-off-by: Jacek Caban <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id 838de56e0ac5b91e2ffa27a696d33e0f09179b2e by Jacek Caban <[email protected]>
This commit is contained in:
winesync
2020-09-16 10:35:46 +02:00
committed by Jérôme Gardou
parent 5768b7b75c
commit 429c6cd3aa
2 changed files with 12 additions and 3 deletions
+11 -2
View File
@@ -637,6 +637,7 @@ static BOOL image_locate_debug_link(const struct module* module, struct image_fi
filename_len = MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, NULL, 0);
path_len = strlenW(module->module.LoadedImageName);
if (module->real_path) path_len = max(path_len, strlenW(module->real_path));
p = HeapAlloc(GetProcessHeap(), 0,
(globalDebugDirLen + path_len + 6 + 1 + filename_len + 1) * sizeof(WCHAR));
if (!p) goto found;
@@ -656,14 +657,22 @@ static BOOL image_locate_debug_link(const struct module* module, struct image_fi
MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, slash + ARRAY_SIZE(dotDebugW), filename_len);
if (image_check_debug_link(p, fmap_link, crc)) goto found;
#ifndef __REACTOS__
if (module->real_path)
{
strcpyW(p, module->real_path);
slash = p;
if ((slash2 = strrchrW(slash, '/'))) slash = slash2 + 1;
if ((slash2 = strrchrW(slash, '\\'))) slash = slash2 + 1;
MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, slash, filename_len);
if (image_check_debug_link(p, fmap_link, crc)) goto found;
}
/* testing globaldebugdir/execdir/filename */
memmove(p + globalDebugDirLen, p, (slash - p) * sizeof(WCHAR));
memcpy(p, globalDebugDirW, globalDebugDirLen * sizeof(WCHAR));
slash += globalDebugDirLen;
MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, slash, filename_len);
if (image_check_debug_link(p, fmap_link, crc)) goto found;
#endif
/* finally testing filename */
if (image_check_debug_link(slash, fmap_link, crc)) goto found;
+1 -1
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: 2642f43eabe6c61341daee24487372b57723894d
wine: 838de56e0ac5b91e2ffa27a696d33e0f09179b2e