Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
133b3069
Commit
133b3069
authored
Feb 17, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use wine_dll_enum_load_path to search the dll load path.
parent
72017cc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
elf_module.c
dlls/dbghelp/elf_module.c
+30
-3
No files found.
dlls/dbghelp/elf_module.c
View file @
133b3069
...
...
@@ -69,6 +69,7 @@
# include <sys/link.h>
#endif
#include "wine/library.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dbghelp
);
...
...
@@ -1160,6 +1161,33 @@ static BOOL elf_load_file_from_path(HANDLE hProcess,
}
/******************************************************************
* elf_load_file_from_dll_path
*
* Tries to load an ELF file from the dll path
*/
static
BOOL
elf_load_file_from_dll_path
(
HANDLE
hProcess
,
const
char
*
filename
,
unsigned
long
load_offset
,
struct
elf_info
*
elf_info
)
{
BOOL
ret
=
FALSE
;
unsigned
int
index
=
0
;
const
char
*
path
;
while
(
!
ret
&&
(
path
=
wine_dll_enum_load_path
(
index
++
)))
{
char
*
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
path
)
+
strlen
(
filename
)
+
2
);
if
(
!
name
)
break
;
strcpy
(
name
,
path
);
strcat
(
name
,
"/"
);
strcat
(
name
,
filename
);
ret
=
elf_load_file
(
hProcess
,
name
,
load_offset
,
elf_info
);
HeapFree
(
GetProcessHeap
(),
0
,
name
);
}
return
ret
;
}
/******************************************************************
* elf_search_and_load_file
*
* lookup a file in standard ELF locations, and if found, load it
...
...
@@ -1187,9 +1215,8 @@ static BOOL elf_search_and_load_file(struct process* pcs, const char* filename,
ret
=
elf_load_file_from_path
(
pcs
,
filename
,
load_offset
,
getenv
(
"PATH"
),
elf_info
)
||
elf_load_file_from_path
(
pcs
,
filename
,
load_offset
,
getenv
(
"LD_LIBRARY_PATH"
),
elf_info
)
||
elf_load_file_from_path
(
pcs
,
filename
,
load_offset
,
getenv
(
"WINEDLLPATH"
),
elf_info
);
getenv
(
"LD_LIBRARY_PATH"
),
elf_info
);
if
(
!
ret
)
ret
=
elf_load_file_from_dll_path
(
pcs
,
filename
,
load_offset
,
elf_info
);
}
return
ret
;
...
...
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