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
f14632f3
Commit
f14632f3
authored
Apr 26, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Support loading builtins from the architecture-specific PE directory.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b51aab91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
path.c
dlls/dbghelp/path.c
+25
-2
No files found.
dlls/dbghelp/path.c
View file @
f14632f3
...
...
@@ -31,6 +31,18 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dbghelp
);
#ifdef __i386__
static
const
WCHAR
pe_dir
[]
=
L"
\\
i386-windows"
;
#elif defined __x86_64__
static
const
WCHAR
pe_dir
[]
=
L"
\\
x86_64-windows"
;
#elif defined __arm__
static
const
WCHAR
pe_dir
[]
=
L"
\\
arm-windows"
;
#elif defined __aarch64__
static
const
WCHAR
pe_dir
[]
=
L"
\\
aarch64-windows"
;
#else
static
const
WCHAR
pe_dir
[]
=
L""
;
#endif
static
inline
BOOL
is_sepA
(
char
ch
)
{
return
ch
==
'/'
||
ch
==
'\\'
;}
static
inline
BOOL
is_sep
(
WCHAR
ch
)
{
return
ch
==
'/'
||
ch
==
'\\'
;}
...
...
@@ -694,6 +706,7 @@ WCHAR *get_dos_file_name(const WCHAR *filename)
BOOL
search_dll_path
(
const
struct
process
*
process
,
const
WCHAR
*
name
,
BOOL
(
*
match
)(
void
*
,
HANDLE
,
const
WCHAR
*
),
void
*
param
)
{
const
WCHAR
*
env
;
WCHAR
*
p
,
*
end
;
size_t
len
,
i
;
HANDLE
file
;
WCHAR
*
buf
;
...
...
@@ -703,7 +716,6 @@ BOOL search_dll_path(const struct process *process, const WCHAR *name, BOOL (*ma
if
((
env
=
process_getenv
(
process
,
L"WINEBUILDDIR"
)))
{
WCHAR
*
p
,
*
end
;
const
WCHAR
dllsW
[]
=
{
'\\'
,
'd'
,
'l'
,
'l'
,
's'
,
'\\'
};
const
WCHAR
programsW
[]
=
{
'\\'
,
'p'
,
'r'
,
'o'
,
'g'
,
'r'
,
'a'
,
'm'
,
's'
,
'\\'
};
const
WCHAR
dot_dllW
[]
=
{
'.'
,
'd'
,
'l'
,
'l'
,
0
};
...
...
@@ -755,8 +767,19 @@ BOOL search_dll_path(const struct process *process, const WCHAR *name, BOOL (*ma
WCHAR
env_name
[
64
];
swprintf
(
env_name
,
ARRAY_SIZE
(
env_name
),
L"WINEDLLDIR%u"
,
i
);
if
(
!
(
env
=
process_getenv
(
process
,
env_name
)))
return
FALSE
;
len
=
wcslen
(
env
)
+
wcslen
(
name
)
+
2
;
len
=
wcslen
(
env
)
+
wcslen
(
pe_dir
)
+
wcslen
(
name
)
+
2
;
if
(
!
(
buf
=
heap_alloc
(
len
*
sizeof
(
WCHAR
))))
return
FALSE
;
if
(
!
(
p
=
wcsrchr
(
name
,
'.'
))
||
lstrcmpW
(
p
,
L".so"
))
{
swprintf
(
buf
,
len
,
L"%s%s
\\
%s"
,
env
,
pe_dir
,
name
);
file
=
CreateFileW
(
buf
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
ret
=
match
(
param
,
file
,
buf
);
CloseHandle
(
file
);
if
(
ret
)
goto
found
;
}
}
swprintf
(
buf
,
len
,
L"%s
\\
%s"
,
env
,
name
);
file
=
CreateFileW
(
buf
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
...
...
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