https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e4721594d40b241554a32…
commit e4721594d40b241554a32fc715ec268fd29207e0
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Fri Sep 11 15:51:26 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Wed Sep 16 10:35:37 2020 +0200
Revert "[DBGHELP] search for debugfiles in modulepath too."
This reverts commit 183294a12e6a1b832ec994399e5efd602ba2b81f.
This will be applied through the winesync script
---
dll/win32/dbghelp/dbghelp_private.h | 6 +++---
dll/win32/dbghelp/msc.c | 4 ++--
dll/win32/dbghelp/path.c | 35 +++--------------------------------
dll/win32/dbghelp/pe_module.c | 2 +-
4 files changed, 9 insertions(+), 38 deletions(-)
diff --git a/dll/win32/dbghelp/dbghelp_private.h b/dll/win32/dbghelp/dbghelp_private.h
index 759aaa93c98..e0c4801584f 100644
--- a/dll/win32/dbghelp/dbghelp_private.h
+++ b/dll/win32/dbghelp/dbghelp_private.h
@@ -688,9 +688,9 @@ extern BOOL pdb_virtual_unwind(struct cpu_stack_walk *csw, DWORD_PTR
ip,
union ctx *context, struct pdb_cmd_pair *cpair) DECLSPEC_HIDDEN;
/* path.c */
-extern BOOL path_find_symbol_file(const struct process* pcs, const struct module*
module,
- PCSTR full_path, const GUID* guid, DWORD dw1,
DWORD dw2,
- PSTR buffer, BOOL* is_unmatched)
DECLSPEC_HIDDEN;
+extern BOOL path_find_symbol_file(const struct process* pcs, PCSTR full_path,
+ const GUID* guid, DWORD dw1, DWORD dw2, PSTR
buffer,
+ BOOL* is_unmatched) DECLSPEC_HIDDEN;
/* pe_module.c */
extern BOOL pe_load_nt_header(HANDLE hProc, DWORD64 base, IMAGE_NT_HEADERS* nth)
DECLSPEC_HIDDEN;
diff --git a/dll/win32/dbghelp/msc.c b/dll/win32/dbghelp/msc.c
index 6003bc34017..0508e120bd8 100644
--- a/dll/win32/dbghelp/msc.c
+++ b/dll/win32/dbghelp/msc.c
@@ -2450,11 +2450,11 @@ static HANDLE map_pdb_file(const struct process* pcs,
switch (lookup->kind)
{
case PDB_JG:
- ret = path_find_symbol_file(pcs, module, lookup->filename, NULL,
lookup->timestamp,
+ ret = path_find_symbol_file(pcs, lookup->filename, NULL,
lookup->timestamp,
lookup->age, dbg_file_path,
&module->module.PdbUnmatched);
break;
case PDB_DS:
- ret = path_find_symbol_file(pcs, module, lookup->filename,
&lookup->guid, 0,
+ ret = path_find_symbol_file(pcs, lookup->filename, &lookup->guid, 0,
lookup->age, dbg_file_path,
&module->module.PdbUnmatched);
break;
}
diff --git a/dll/win32/dbghelp/path.c b/dll/win32/dbghelp/path.c
index f8f268d8e9a..8c74426eec3 100644
--- a/dll/win32/dbghelp/path.c
+++ b/dll/win32/dbghelp/path.c
@@ -49,17 +49,6 @@ static inline const WCHAR* file_nameW(const WCHAR* str)
return p + 1;
}
-static inline void file_pathW(const WCHAR* srcFileNameW,
- WCHAR* dstFilePathW)
-{
- int len;
-
- for (len = strlenW(srcFileNameW) - 1; (len > 0) &&
(!is_sepW(srcFileNameW[len])); len--);
-
- strncpyW(dstFilePathW, srcFileNameW, len);
- dstFilePathW[len] = L'\0';
-}
-
/******************************************************************
* FindDebugInfoFile (DBGHELP.@)
*
@@ -623,9 +612,9 @@ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user)
return mf->matched == 2;
}
-BOOL path_find_symbol_file(const struct process* pcs, const struct module* module,
- PCSTR full_path, const GUID* guid, DWORD dw1, DWORD dw2,
- PSTR buffer, BOOL* is_unmatched)
+BOOL path_find_symbol_file(const struct process* pcs, PCSTR full_path,
+ const GUID* guid, DWORD dw1, DWORD dw2, PSTR buffer,
+ BOOL* is_unmatched)
{
struct module_find mf;
WCHAR full_pathW[MAX_PATH];
@@ -654,24 +643,6 @@ BOOL path_find_symbol_file(const struct process* pcs, const struct
module* modul
return TRUE;
}
- /* FIXME: Use Environment-Variables (see MS docs)
- _NT_SYMBOL_PATH and _NT_ALT_SYMBOL_PATH
- FIXME: Implement "Standard Path Elements" (Path) ... (see MS docs)
- do a search for (every?) path-element like this ...
- <path>
- <path>\dll
- <path>\symbols\dll
- (dll may be exe, or sys depending on the file extension) */
-
- /* 2. check module-path */
- file_pathW(module->module.LoadedImageName, tmp);
- if (do_searchW(filename, tmp, FALSE, module_find_cb, &mf))
- {
- WideCharToMultiByte(CP_ACP, 0, tmp, -1, buffer, MAX_PATH, NULL, NULL);
- return TRUE;
- }
-
- /* 3. check search-path */
while (searchPath)
{
ptr = strchrW(searchPath, ';');
diff --git a/dll/win32/dbghelp/pe_module.c b/dll/win32/dbghelp/pe_module.c
index 4b9eac4f032..376a780653b 100644
--- a/dll/win32/dbghelp/pe_module.c
+++ b/dll/win32/dbghelp/pe_module.c
@@ -560,7 +560,7 @@ static BOOL pe_load_dbg_file(const struct process* pcs, struct module*
module,
TRACE("Processing DBG file %s\n", debugstr_a(dbg_name));
- if (path_find_symbol_file(pcs, module, dbg_name, NULL, timestamp, 0, tmp,
&module->module.DbgUnmatched) &&
+ if (path_find_symbol_file(pcs, dbg_name, NULL, timestamp, 0, tmp,
&module->module.DbgUnmatched) &&
(hFile = CreateFileA(tmp, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) !=
INVALID_HANDLE_VALUE &&
((hMap = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) != 0)
&&