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
7b6f6257
Commit
7b6f6257
authored
May 13, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
May 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use debuggee environment in search_unix_path.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4475524e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-1
elf_module.c
dlls/dbghelp/elf_module.c
+1
-1
macho_module.c
dlls/dbghelp/macho_module.c
+3
-3
path.c
dlls/dbghelp/path.c
+6
-6
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
7b6f6257
...
...
@@ -674,7 +674,7 @@ extern BOOL path_find_symbol_file(const struct process* pcs, const struc
extern
WCHAR
*
get_dos_file_name
(
const
WCHAR
*
filename
)
DECLSPEC_HIDDEN
;
extern
BOOL
search_dll_path
(
const
struct
process
*
process
,
const
WCHAR
*
name
,
BOOL
(
*
match
)(
void
*
,
HANDLE
,
const
WCHAR
*
),
void
*
param
)
DECLSPEC_HIDDEN
;
extern
BOOL
search_unix_path
(
const
WCHAR
*
name
,
const
char
*
path
,
BOOL
(
*
match
)(
void
*
,
HANDLE
,
const
WCHAR
*
),
void
*
param
)
DECLSPEC_HIDDEN
;
extern
BOOL
search_unix_path
(
const
WCHAR
*
name
,
const
WCHAR
*
path
,
BOOL
(
*
match
)(
void
*
,
HANDLE
,
const
WCHAR
*
),
void
*
param
)
DECLSPEC_HIDDEN
;
extern
const
WCHAR
*
file_name
(
const
WCHAR
*
str
)
DECLSPEC_HIDDEN
;
extern
const
char
*
file_nameA
(
const
char
*
str
)
DECLSPEC_HIDDEN
;
...
...
dlls/dbghelp/elf_module.c
View file @
7b6f6257
...
...
@@ -1435,7 +1435,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
load_elf
.
dyn_addr
=
dyn_addr
;
load_elf
.
elf_info
=
elf_info
;
ret
=
search_unix_path
(
filename
,
getenv
(
"LD_LIBRARY_PATH"
),
elf_load_file_cb
,
&
load_elf
)
ret
=
search_unix_path
(
filename
,
process_getenv
(
pcs
,
L
"LD_LIBRARY_PATH"
),
elf_load_file_cb
,
&
load_elf
)
||
search_dll_path
(
pcs
,
filename
,
elf_load_file_cb
,
&
load_elf
);
}
...
...
dlls/dbghelp/macho_module.c
View file @
7b6f6257
...
...
@@ -1574,7 +1574,7 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam
/* Try DYLD_LIBRARY_PATH first. */
p
=
file_name
(
filename
);
ret
=
search_unix_path
(
p
,
getenv
(
"DYLD_LIBRARY_PATH"
),
macho_load_file_cb
,
&
load_params
);
ret
=
search_unix_path
(
p
,
process_getenv
(
pcs
,
L
"DYLD_LIBRARY_PATH"
),
macho_load_file_cb
,
&
load_params
);
/* Try the path as given. */
if
(
!
ret
)
...
...
@@ -1582,9 +1582,9 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam
/* Try DYLD_FALLBACK_LIBRARY_PATH, with just the filename (no directories). */
if
(
!
ret
)
{
const
char
*
fallback
=
getenv
(
"DYLD_FALLBACK_LIBRARY_PATH"
);
const
WCHAR
*
fallback
=
process_getenv
(
pcs
,
L
"DYLD_FALLBACK_LIBRARY_PATH"
);
if
(
!
fallback
)
fallback
=
"/usr/local/lib:/lib:/usr/lib"
;
fallback
=
L
"/usr/local/lib:/lib:/usr/lib"
;
ret
=
search_unix_path
(
p
,
fallback
,
macho_load_file_cb
,
&
load_params
);
}
if
(
!
ret
&&
p
==
filename
)
...
...
dlls/dbghelp/path.c
View file @
7b6f6257
...
...
@@ -779,9 +779,9 @@ found:
return
TRUE
;
}
BOOL
search_unix_path
(
const
WCHAR
*
name
,
const
char
*
path
,
BOOL
(
*
match
)(
void
*
,
HANDLE
,
const
WCHAR
*
),
void
*
param
)
BOOL
search_unix_path
(
const
WCHAR
*
name
,
const
WCHAR
*
path
,
BOOL
(
*
match
)(
void
*
,
HANDLE
,
const
WCHAR
*
),
void
*
param
)
{
const
char
*
iter
,
*
next
;
const
WCHAR
*
iter
,
*
next
;
size_t
size
,
len
;
WCHAR
*
dos_path
;
char
*
buf
;
...
...
@@ -790,16 +790,16 @@ BOOL search_unix_path(const WCHAR *name, const char *path, BOOL (*match)(void*,
if
(
!
path
)
return
FALSE
;
name
=
file_name
(
name
);
size
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
name
,
-
1
,
NULL
,
0
,
NULL
,
NULL
)
+
strlen
(
path
)
+
1
;
size
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
name
,
-
1
,
NULL
,
0
,
NULL
,
NULL
)
+
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
path
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
!
(
buf
=
heap_alloc
(
size
)))
return
FALSE
;
for
(
iter
=
path
;;
iter
=
next
+
1
)
{
if
(
!
(
next
=
strchr
(
iter
,
':'
)))
next
=
iter
+
strlen
(
iter
);
if
(
!
(
next
=
wcschr
(
iter
,
':'
)))
next
=
iter
+
lstrlenW
(
iter
);
if
(
*
iter
==
'/'
)
{
len
=
next
-
iter
;
memcpy
(
buf
,
iter
,
len
);
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
iter
,
next
-
iter
,
buf
,
size
,
NULL
,
NULL
);
if
(
buf
[
len
-
1
]
!=
'/'
)
buf
[
len
++
]
=
'/'
;
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
name
,
-
1
,
buf
+
len
,
size
-
len
,
NULL
,
NULL
);
if
((
dos_path
=
wine_get_dos_file_name
(
buf
)))
...
...
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