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
a676c578
Commit
a676c578
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_debug_info.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5ae3f969
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
26 deletions
+15
-26
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-2
elf_module.c
dlls/dbghelp/elf_module.c
+3
-7
macho_module.c
dlls/dbghelp/macho_module.c
+2
-5
module.c
dlls/dbghelp/module.c
+9
-12
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
a676c578
...
...
@@ -393,6 +393,7 @@ struct loader_ops
{
BOOL
(
*
synchronize_module_list
)(
struct
process
*
process
);
struct
module
*
(
*
load_module
)(
struct
process
*
process
,
const
WCHAR
*
name
,
ULONG_PTR
addr
);
BOOL
(
*
load_debug_info
)(
struct
process
*
process
,
struct
module
*
module
);
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,13 +604,11 @@ extern struct cpu* cpu_find(DWORD) DECLSPEC_HIDDEN;
extern
DWORD
calc_crc32
(
HANDLE
handle
)
DECLSPEC_HIDDEN
;
/* elf_module.c */
extern
BOOL
elf_load_debug_info
(
struct
module
*
module
)
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
BOOL
macho_read_wine_loader_dbg_info
(
struct
process
*
pcs
)
DECLSPEC_HIDDEN
;
/* minidump.c */
...
...
dlls/dbghelp/elf_module.c
View file @
a676c578
...
...
@@ -1041,7 +1041,7 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
*
* Loads ELF debugging information from the module image file.
*/
BOOL
elf_load_debug_info
(
struct
module
*
module
)
static
BOOL
elf_load_debug_info
(
struct
process
*
process
,
struct
module
*
module
)
{
BOOL
ret
=
TRUE
;
struct
pool
pool
;
...
...
@@ -1198,7 +1198,7 @@ static BOOL elf_load_file_from_fmap(struct process* pcs, const WCHAR* filename,
elf_info
->
module
->
module
.
SymType
=
SymDeferred
;
ret
=
TRUE
;
}
else
ret
=
elf_load_debug_info
(
elf_info
->
module
);
else
ret
=
elf_load_debug_info
(
pcs
,
elf_info
->
module
);
elf_module_info
->
elf_mark
=
1
;
elf_module_info
->
elf_loader
=
0
;
...
...
@@ -1707,6 +1707,7 @@ static const struct loader_ops elf_loader_ops =
{
elf_synchronize_module_list
,
elf_load_module
,
elf_load_debug_info
,
elf_enum_modules
,
elf_fetch_file_info
,
};
...
...
@@ -1741,11 +1742,6 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs)
return
FALSE
;
}
BOOL
elf_load_debug_info
(
struct
module
*
module
)
{
return
FALSE
;
}
int
elf_is_in_thunk_area
(
unsigned
long
addr
,
const
struct
elf_thunk_area
*
thunks
)
{
...
...
dlls/dbghelp/macho_module.c
View file @
a676c578
...
...
@@ -1281,7 +1281,7 @@ static BOOL image_uses_split_segs(struct process* process, unsigned long load_ad
*
* Loads Mach-O debugging information from the module image file.
*/
BOOL
macho_load_debug_info
(
struct
process
*
pcs
,
struct
module
*
module
)
static
BOOL
macho_load_debug_info
(
struct
process
*
pcs
,
struct
module
*
module
)
{
BOOL
ret
=
FALSE
;
struct
macho_debug_info
mdi
;
...
...
@@ -1907,6 +1907,7 @@ static const struct loader_ops macho_loader_ops =
{
macho_synchronize_module_list
,
macho_load_module
,
macho_load_debug_info
,
macho_enum_modules
,
macho_fetch_file_info
,
};
...
...
@@ -1937,8 +1938,4 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs)
return
FALSE
;
}
BOOL
macho_load_debug_info
(
struct
process
*
pcs
,
struct
module
*
module
)
{
return
FALSE
;
}
#endif
/* HAVE_MACH_O_LOADER_H */
dlls/dbghelp/module.c
View file @
a676c578
...
...
@@ -374,12 +374,8 @@ BOOL module_get_debug(struct module_pair* pair)
BOOL
ret
;
if
(
pair
->
effective
->
is_virtual
)
ret
=
FALSE
;
else
switch
(
pair
->
effective
->
type
)
else
if
(
pair
->
effective
->
type
==
DMT_PE
)
{
case
DMT_ELF
:
ret
=
elf_load_debug_info
(
pair
->
effective
);
break
;
case
DMT_PE
:
idslW64
.
SizeOfStruct
=
sizeof
(
idslW64
);
idslW64
.
BaseOfImage
=
pair
->
effective
->
module
.
BaseOfImage
;
idslW64
.
CheckSum
=
pair
->
effective
->
module
.
CheckSum
;
...
...
@@ -394,14 +390,9 @@ BOOL module_get_debug(struct module_pair* pair)
pcs_callback
(
pair
->
pcs
,
ret
?
CBA_DEFERRED_SYMBOL_LOAD_COMPLETE
:
CBA_DEFERRED_SYMBOL_LOAD_FAILURE
,
&
idslW64
);
break
;
case
DMT_MACHO
:
ret
=
macho_load_debug_info
(
pair
->
pcs
,
pair
->
effective
);
break
;
default:
ret
=
FALSE
;
break
;
}
else
ret
=
pair
->
pcs
->
loader
->
load_debug_info
(
pair
->
pcs
,
pair
->
effective
);
if
(
!
ret
)
pair
->
effective
->
module
.
SymType
=
SymNone
;
assert
(
pair
->
effective
->
module
.
SymType
!=
SymDeferred
);
pair
->
effective
->
module
.
NumSyms
=
pair
->
effective
->
ht_symbols
.
num_elts
;
...
...
@@ -1425,6 +1416,11 @@ static struct module* native_load_module(struct process* pcs, const WCHAR* name,
return
NULL
;
}
static
BOOL
native_load_debug_info
(
struct
process
*
process
,
struct
module
*
module
)
{
return
FALSE
;
}
static
BOOL
native_enum_modules
(
struct
process
*
process
,
enum_modules_cb
cb
,
void
*
user
)
{
return
FALSE
;
...
...
@@ -1440,6 +1436,7 @@ const struct loader_ops no_loader_ops =
{
native_synchronize_module_list
,
native_load_module
,
native_load_debug_info
,
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