Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6030ee5f
Commit
6030ee5f
authored
Nov 05, 2018
by
Andreas Maier
Committed by
Alexandre Julliard
Nov 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Search for debug files in module path too.
Signed-off-by:
Andreas Maier
<
andy1.m@gmx.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d7b05b21
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
9 deletions
+35
-9
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+3
-3
msc.c
dlls/dbghelp/msc.c
+2
-2
path.c
dlls/dbghelp/path.c
+29
-3
pe_module.c
dlls/dbghelp/pe_module.c
+1
-1
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
6030ee5f
...
...
@@ -657,9 +657,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
,
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
,
const
struct
module
*
module
,
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
;
...
...
dlls/dbghelp/msc.c
View file @
6030ee5f
...
...
@@ -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
,
lookup
->
filename
,
NULL
,
lookup
->
timestamp
,
ret
=
path_find_symbol_file
(
pcs
,
module
,
lookup
->
filename
,
NULL
,
lookup
->
timestamp
,
lookup
->
age
,
dbg_file_path
,
&
module
->
module
.
PdbUnmatched
);
break
;
case
PDB_DS
:
ret
=
path_find_symbol_file
(
pcs
,
lookup
->
filename
,
&
lookup
->
guid
,
0
,
ret
=
path_find_symbol_file
(
pcs
,
module
,
lookup
->
filename
,
&
lookup
->
guid
,
0
,
lookup
->
age
,
dbg_file_path
,
&
module
->
module
.
PdbUnmatched
);
break
;
}
...
...
dlls/dbghelp/path.c
View file @
6030ee5f
...
...
@@ -49,6 +49,15 @@ static inline const WCHAR* file_nameW(const WCHAR* str)
return
p
+
1
;
}
static
inline
void
file_pathW
(
const
WCHAR
*
src
,
WCHAR
*
dst
)
{
int
len
;
for
(
len
=
strlenW
(
src
)
-
1
;
(
len
>
0
)
&&
(
!
is_sepW
(
src
[
len
]));
len
--
);
memcpy
(
dst
,
src
,
len
*
sizeof
(
WCHAR
)
);
dst
[
len
]
=
0
;
}
/******************************************************************
* FindDebugInfoFile (DBGHELP.@)
*
...
...
@@ -612,9 +621,9 @@ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user)
return
mf
->
matched
==
2
;
}
BOOL
path_find_symbol_file
(
const
struct
process
*
pcs
,
PCSTR
full_path
,
const
GUID
*
guid
,
DWORD
dw1
,
DWORD
dw2
,
PSTR
buffer
,
BOOL
*
is_unmatched
)
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
)
{
struct
module_find
mf
;
WCHAR
full_pathW
[
MAX_PATH
];
...
...
@@ -643,6 +652,23 @@ BOOL path_find_symbol_file(const struct process* pcs, PCSTR full_path,
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
;
}
while
(
searchPath
)
{
ptr
=
strchrW
(
searchPath
,
';'
);
...
...
dlls/dbghelp/pe_module.c
View file @
6030ee5f
...
...
@@ -531,7 +531,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
,
dbg_name
,
NULL
,
timestamp
,
0
,
tmp
,
&
module
->
module
.
DbgUnmatched
)
&&
if
(
path_find_symbol_file
(
pcs
,
module
,
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
)
&&
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment