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
be9072ec
Commit
be9072ec
authored
Mar 23, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use search_dll_path to load seach macho files.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c3bb866b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
40 deletions
+1
-40
macho_module.c
dlls/dbghelp/macho_module.c
+1
-40
No files found.
dlls/dbghelp/macho_module.c
View file @
be9072ec
...
...
@@ -48,7 +48,6 @@
#define WIN32_NO_STATUS
#include "dbghelp_private.h"
#include "winternl.h"
#include "wine/library.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "image_private.h"
...
...
@@ -1537,44 +1536,6 @@ static BOOL macho_load_file_cb(void *param, HANDLE handle, const WCHAR *filename
}
/******************************************************************
* macho_load_file_from_dll_path
*
* Tries to load a Mach-O file from the dll path
*/
static
BOOL
macho_load_file_from_dll_path
(
struct
process
*
pcs
,
const
WCHAR
*
filename
,
unsigned
long
load_addr
,
struct
macho_info
*
macho_info
)
{
BOOL
ret
=
FALSE
;
unsigned
int
index
=
0
;
const
char
*
path
;
TRACE
(
"(%p/%p, %s, 0x%08lx, %p)
\n
"
,
pcs
,
pcs
->
handle
,
debugstr_w
(
filename
),
load_addr
,
macho_info
);
while
(
!
ret
&&
(
path
=
wine_dll_enum_load_path
(
index
++
)))
{
WCHAR
*
name
;
unsigned
len
;
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
path
,
-
1
,
NULL
,
0
);
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
lstrlenW
(
filename
)
+
2
)
*
sizeof
(
WCHAR
)
);
if
(
!
name
)
break
;
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
path
,
-
1
,
name
,
len
);
strcatW
(
name
,
S_SlashW
);
strcatW
(
name
,
filename
);
ret
=
macho_load_file
(
pcs
,
name
,
load_addr
,
macho_info
);
HeapFree
(
GetProcessHeap
(),
0
,
name
);
}
TRACE
(
" => %d
\n
"
,
ret
);
return
ret
;
}
/******************************************************************
* macho_search_and_load_file
*
* Lookup a file in standard Mach-O locations, and if found, load it
...
...
@@ -1628,7 +1589,7 @@ static BOOL macho_search_and_load_file(struct process* pcs, const WCHAR* filenam
ret
=
search_unix_path
(
p
,
fallback
,
macho_load_file_cb
,
&
load_params
);
}
if
(
!
ret
&&
p
==
filename
)
ret
=
macho_load_file_from_dll_path
(
pcs
,
filename
,
load_addr
,
macho_info
);
ret
=
search_dll_path
(
filename
,
macho_load_file_cb
,
&
load_params
);
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