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
5ae3f969
Commit
5ae3f969
authored
Mar 25, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use loader_ops for load_module.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
16a3481b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
28 deletions
+12
-28
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-4
elf_module.c
dlls/dbghelp/elf_module.c
+2
-6
macho_module.c
dlls/dbghelp/macho_module.c
+2
-6
module.c
dlls/dbghelp/module.c
+7
-12
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
5ae3f969
...
...
@@ -392,6 +392,7 @@ typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user);
struct
loader_ops
{
BOOL
(
*
synchronize_module_list
)(
struct
process
*
process
);
struct
module
*
(
*
load_module
)(
struct
process
*
process
,
const
WCHAR
*
name
,
ULONG_PTR
addr
);
BOOL
(
*
enum_modules
)(
struct
process
*
process
,
enum_modules_cb
callback
,
void
*
user
);
BOOL
(
*
fetch_file_info
)(
struct
process
*
process
,
const
WCHAR
*
name
,
ULONG_PTR
load_addr
,
DWORD_PTR
*
base
,
DWORD
*
size
,
DWORD
*
checksum
);
};
...
...
@@ -603,16 +604,12 @@ extern DWORD calc_crc32(HANDLE handle) DECLSPEC_HIDDEN;
/* elf_module.c */
extern
BOOL
elf_load_debug_info
(
struct
module
*
module
)
DECLSPEC_HIDDEN
;
extern
struct
module
*
elf_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
)
DECLSPEC_HIDDEN
;
extern
BOOL
elf_read_wine_loader_dbg_info
(
struct
process
*
pcs
)
DECLSPEC_HIDDEN
;
struct
elf_thunk_area
;
extern
int
elf_is_in_thunk_area
(
unsigned
long
addr
,
const
struct
elf_thunk_area
*
thunks
)
DECLSPEC_HIDDEN
;
/* macho_module.c */
extern
BOOL
macho_load_debug_info
(
struct
process
*
pcs
,
struct
module
*
module
)
DECLSPEC_HIDDEN
;
extern
struct
module
*
macho_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
)
DECLSPEC_HIDDEN
;
extern
BOOL
macho_read_wine_loader_dbg_info
(
struct
process
*
pcs
)
DECLSPEC_HIDDEN
;
/* minidump.c */
...
...
dlls/dbghelp/elf_module.c
View file @
5ae3f969
...
...
@@ -1583,7 +1583,7 @@ static BOOL elf_load_cb(const WCHAR* name, unsigned long load_addr,
* Also, find module real name and load address from
* the real loaded modules list in pcs address space
*/
st
ruct
module
*
elf_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
addr
)
st
atic
struct
module
*
elf_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
addr
)
{
struct
elf_load
el
;
...
...
@@ -1706,6 +1706,7 @@ static BOOL elf_search_loader(struct process* pcs, struct elf_info* elf_info)
static
const
struct
loader_ops
elf_loader_ops
=
{
elf_synchronize_module_list
,
elf_load_module
,
elf_enum_modules
,
elf_fetch_file_info
,
};
...
...
@@ -1740,11 +1741,6 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs)
return
FALSE
;
}
struct
module
*
elf_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
addr
)
{
return
NULL
;
}
BOOL
elf_load_debug_info
(
struct
module
*
module
)
{
return
FALSE
;
...
...
dlls/dbghelp/macho_module.c
View file @
5ae3f969
...
...
@@ -1782,7 +1782,7 @@ static BOOL macho_load_cb(const WCHAR* name, unsigned long addr, void* user)
* Also, find module real name and load address from
* the real loaded modules list in pcs address space.
*/
st
ruct
module
*
macho_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
addr
)
st
atic
struct
module
*
macho_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
addr
)
{
struct
macho_load
ml
;
...
...
@@ -1906,6 +1906,7 @@ static BOOL macho_search_loader(struct process* pcs, struct macho_info* macho_in
static
const
struct
loader_ops
macho_loader_ops
=
{
macho_synchronize_module_list
,
macho_load_module
,
macho_enum_modules
,
macho_fetch_file_info
,
};
...
...
@@ -1936,11 +1937,6 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs)
return
FALSE
;
}
struct
module
*
macho_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
addr
)
{
return
NULL
;
}
BOOL
macho_load_debug_info
(
struct
process
*
pcs
,
struct
module
*
module
)
{
return
FALSE
;
...
...
dlls/dbghelp/module.c
View file @
5ae3f969
...
...
@@ -890,18 +890,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
wImageName
)
{
/* and finally an ELF or Mach-O module */
switch
(
module_get_type_by_name
(
wImageName
))
{
case
DMT_ELF
:
module
=
elf_load_module
(
pcs
,
wImageName
,
BaseOfDll
);
break
;
case
DMT_MACHO
:
module
=
macho_load_module
(
pcs
,
wImageName
,
BaseOfDll
);
break
;
default:
/* Ignored */
break
;
}
module
=
pcs
->
loader
->
load_module
(
pcs
,
wImageName
,
BaseOfDll
);
}
}
if
(
!
module
)
...
...
@@ -1431,6 +1420,11 @@ static BOOL native_synchronize_module_list(struct process* pcs)
return
FALSE
;
}
static
struct
module
*
native_load_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
unsigned
long
addr
)
{
return
NULL
;
}
static
BOOL
native_enum_modules
(
struct
process
*
process
,
enum_modules_cb
cb
,
void
*
user
)
{
return
FALSE
;
...
...
@@ -1445,6 +1439,7 @@ static BOOL native_fetch_file_info(struct process* process, const WCHAR* name, U
const
struct
loader_ops
no_loader_ops
=
{
native_synchronize_module_list
,
native_load_module
,
native_enum_modules
,
native_fetch_file_info
,
};
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