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
724f433f
Commit
724f433f
authored
Mar 24, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Pass process struct to elf_enum_modules and macho_enum_modules.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6b3018d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
21 deletions
+15
-21
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+2
-2
elf_module.c
dlls/dbghelp/elf_module.c
+4
-8
macho_module.c
dlls/dbghelp/macho_module.c
+4
-9
minidump.c
dlls/dbghelp/minidump.c
+5
-2
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
724f433f
...
...
@@ -594,7 +594,7 @@ extern DWORD calc_crc32(HANDLE handle) DECLSPEC_HIDDEN;
typedef
BOOL
(
*
enum_modules_cb
)(
const
WCHAR
*
,
unsigned
long
addr
,
void
*
user
);
/* elf_module.c */
extern
BOOL
elf_enum_modules
(
HANDLE
hProc
,
enum_modules_cb
,
void
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
elf_enum_modules
(
struct
process
*
,
enum_modules_cb
,
void
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
elf_fetch_file_info
(
const
WCHAR
*
name
,
DWORD_PTR
*
base
,
DWORD
*
size
,
DWORD
*
checksum
)
DECLSPEC_HIDDEN
;
struct
image_file_map
;
extern
BOOL
elf_load_debug_info
(
struct
module
*
module
)
DECLSPEC_HIDDEN
;
...
...
@@ -606,7 +606,7 @@ 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_enum_modules
(
HANDLE
hProc
,
enum_modules_cb
,
void
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
macho_enum_modules
(
struct
process
*
,
enum_modules_cb
,
void
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
macho_fetch_file_info
(
HANDLE
process
,
const
WCHAR
*
name
,
unsigned
long
load_addr
,
DWORD_PTR
*
base
,
DWORD
*
size
,
DWORD
*
checksum
)
DECLSPEC_HIDDEN
;
extern
BOOL
macho_load_debug_info
(
struct
process
*
pcs
,
struct
module
*
module
)
DECLSPEC_HIDDEN
;
extern
struct
module
*
...
...
dlls/dbghelp/elf_module.c
View file @
724f433f
...
...
@@ -1561,21 +1561,17 @@ static BOOL elf_enum_modules_translate(const WCHAR* name, unsigned long load_add
* This function doesn't require that someone has called SymInitialize
* on this very process.
*/
BOOL
elf_enum_modules
(
HANDLE
hProc
,
enum_modules_cb
cb
,
void
*
user
)
BOOL
elf_enum_modules
(
struct
process
*
process
,
enum_modules_cb
cb
,
void
*
user
)
{
struct
process
pcs
;
struct
elf_info
elf_info
;
BOOL
ret
;
struct
elf_enum_user
eeu
;
memset
(
&
pcs
,
0
,
sizeof
(
pcs
));
pcs
.
handle
=
hProc
;
elf_info
.
flags
=
ELF_INFO_DEBUG_HEADER
|
ELF_INFO_NAME
;
if
(
!
elf_search_loader
(
&
pcs
,
&
elf_info
))
return
FALSE
;
pcs
.
dbg_hdr_addr
=
elf_info
.
dbg_hdr_addr
;
elf_info
.
module_name
=
NULL
;
eeu
.
cb
=
cb
;
eeu
.
user
=
user
;
ret
=
elf_enum_modules_internal
(
&
pc
s
,
elf_info
.
module_name
,
elf_enum_modules_translate
,
&
eeu
);
ret
=
elf_enum_modules_internal
(
proces
s
,
elf_info
.
module_name
,
elf_enum_modules_translate
,
&
eeu
);
HeapFree
(
GetProcessHeap
(),
0
,
(
char
*
)
elf_info
.
module_name
);
return
ret
;
}
...
...
@@ -1747,7 +1743,7 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs)
return
FALSE
;
}
BOOL
elf_enum_modules
(
HANDLE
hProc
,
enum_modules_cb
cb
,
void
*
user
)
BOOL
elf_enum_modules
(
struct
process
*
process
,
enum_modules_cb
cb
,
void
*
user
)
{
return
FALSE
;
}
...
...
dlls/dbghelp/macho_module.c
View file @
724f433f
...
...
@@ -1843,19 +1843,14 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs)
* This function doesn't require that someone has called SymInitialize
* on this very process.
*/
BOOL
macho_enum_modules
(
HANDLE
hProc
,
enum_modules_cb
cb
,
void
*
user
)
BOOL
macho_enum_modules
(
struct
process
*
process
,
enum_modules_cb
cb
,
void
*
user
)
{
struct
process
pcs
;
struct
macho_info
macho_info
;
BOOL
ret
;
TRACE
(
"(%p, %p, %p)
\n
"
,
hProc
,
cb
,
user
);
memset
(
&
pcs
,
0
,
sizeof
(
pcs
));
pcs
.
handle
=
hProc
;
TRACE
(
"(%p, %p, %p)
\n
"
,
process
->
handle
,
cb
,
user
);
macho_info
.
flags
=
MACHO_INFO_DEBUG_HEADER
|
MACHO_INFO_NAME
;
if
(
!
macho_search_loader
(
&
pcs
,
&
macho_info
))
return
FALSE
;
pcs
.
dbg_hdr_addr
=
macho_info
.
dbg_hdr_addr
;
ret
=
macho_enum_modules_internal
(
&
pcs
,
macho_info
.
module_name
,
cb
,
user
);
ret
=
macho_enum_modules_internal
(
process
,
macho_info
.
module_name
,
cb
,
user
);
HeapFree
(
GetProcessHeap
(),
0
,
(
char
*
)
macho_info
.
module_name
);
return
ret
;
}
...
...
@@ -1949,7 +1944,7 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs)
return
FALSE
;
}
BOOL
macho_enum_modules
(
HANDLE
hProc
,
enum_modules_cb
cb
,
void
*
user
)
BOOL
macho_enum_modules
(
struct
process
*
process
,
enum_modules_cb
cb
,
void
*
user
)
{
return
FALSE
;
}
...
...
dlls/dbghelp/minidump.c
View file @
724f433f
...
...
@@ -346,8 +346,11 @@ static void fetch_modules_info(struct dump_context* dc)
* And it's always a good idea to have a trace of the loaded ELF modules for
* a given application in a post mortem debugging condition.
*/
elf_enum_modules
(
dc
->
process
->
handle
,
fetch_elf_module_info_cb
,
dc
);
macho_enum_modules
(
dc
->
process
->
handle
,
fetch_macho_module_info_cb
,
dc
);
if
(
dc
->
process
->
dbg_hdr_addr
)
{
elf_enum_modules
(
dc
->
process
,
fetch_elf_module_info_cb
,
dc
);
macho_enum_modules
(
dc
->
process
,
fetch_macho_module_info_cb
,
dc
);
}
}
static
void
fetch_module_versioninfo
(
LPCWSTR
filename
,
VS_FIXEDFILEINFO
*
ffi
)
...
...
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