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
f1436139
Commit
f1436139
authored
Mar 13, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Rewrote SymEnumerateModules with Unicode basis, and implemented SymEnumerateModulesW64.
parent
851197f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
15 deletions
+55
-15
dbghelp.spec
dlls/dbghelp/dbghelp.spec
+1
-1
module.c
dlls/dbghelp/module.c
+52
-14
dbghelp.h
include/dbghelp.h
+2
-0
No files found.
dlls/dbghelp/dbghelp.spec
View file @
f1436139
...
...
@@ -46,7 +46,7 @@
@ stdcall SymEnumTypesW(ptr double ptr ptr)
@ stdcall SymEnumerateModules(long ptr ptr)
@ stdcall SymEnumerateModules64(long ptr ptr)
@ st
ub SymEnumerateModulesW64
@ st
dcall SymEnumerateModulesW64(long ptr ptr)
@ stdcall SymEnumerateSymbols(long long ptr ptr)
@ stub SymEnumerateSymbols64
@ stub SymEnumerateSymbolsW
...
...
dlls/dbghelp/module.c
View file @
f1436139
...
...
@@ -632,34 +632,72 @@ BOOL WINAPI SymUnloadModule64(HANDLE hProcess, DWORD64 BaseOfDll)
* SymEnumerateModules (DBGHELP.@)
*
*/
struct
enum_modW64_32
{
PSYM_ENUMMODULES_CALLBACK
cb
;
PVOID
user
;
char
module
[
MAX_PATH
];
};
static
BOOL
CALLBACK
enum_modW64_32
(
PWSTR
name
,
DWORD64
base
,
PVOID
user
)
{
struct
enum_modW64_32
*
x
=
user
;
WideCharToMultiByte
(
CP_ACP
,
0
,
name
,
-
1
,
x
->
module
,
sizeof
(
x
->
module
),
NULL
,
NULL
);
return
x
->
cb
(
x
->
module
,
(
DWORD
)
base
,
x
->
user
);
}
BOOL
WINAPI
SymEnumerateModules
(
HANDLE
hProcess
,
PSYM_ENUMMODULES_CALLBACK
EnumModulesCallback
,
PVOID
UserContext
)
{
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
struct
module
*
module
;
struct
enum_modW64_32
x
;
if
(
!
pcs
)
return
FALSE
;
for
(
module
=
pcs
->
lmodules
;
module
;
module
=
module
->
next
)
{
if
(
!
(
dbghelp_options
&
SYMOPT_WINE_WITH_ELF_MODULES
)
&&
module
->
type
==
DMT_ELF
)
continue
;
if
(
!
EnumModulesCallback
(
module
->
module_name
,
module
->
module
.
BaseOfImage
,
UserContext
))
break
;
}
return
TRUE
;
x
.
cb
=
EnumModulesCallback
;
x
.
user
=
UserContext
;
return
SymEnumerateModulesW64
(
hProcess
,
enum_modW64_32
,
&
x
);
}
/******************************************************************
* SymEnumerateModules64 (DBGHELP.@)
*
*/
struct
enum_modW64_64
{
PSYM_ENUMMODULES_CALLBACK64
cb
;
PVOID
user
;
char
module
[
MAX_PATH
];
};
static
BOOL
CALLBACK
enum_modW64_64
(
PWSTR
name
,
DWORD64
base
,
PVOID
user
)
{
struct
enum_modW64_64
*
x
=
user
;
WideCharToMultiByte
(
CP_ACP
,
0
,
name
,
-
1
,
x
->
module
,
sizeof
(
x
->
module
),
NULL
,
NULL
);
return
x
->
cb
(
x
->
module
,
base
,
x
->
user
);
}
BOOL
WINAPI
SymEnumerateModules64
(
HANDLE
hProcess
,
PSYM_ENUMMODULES_CALLBACK64
EnumModulesCallback
,
PVOID
UserContext
)
{
struct
enum_modW64_64
x
;
x
.
cb
=
EnumModulesCallback
;
x
.
user
=
UserContext
;
return
SymEnumerateModulesW64
(
hProcess
,
enum_modW64_64
,
&
x
);
}
/******************************************************************
* SymEnumerateModulesW64 (DBGHELP.@)
*
*/
BOOL
WINAPI
SymEnumerateModulesW64
(
HANDLE
hProcess
,
PSYM_ENUMMODULES_CALLBACKW64
EnumModulesCallback
,
PVOID
UserContext
)
{
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
struct
module
*
module
;
...
...
@@ -669,7 +707,7 @@ BOOL WINAPI SymEnumerateModules64(HANDLE hProcess,
{
if
(
!
(
dbghelp_options
&
SYMOPT_WINE_WITH_ELF_MODULES
)
&&
module
->
type
==
DMT_ELF
)
continue
;
if
(
!
EnumModulesCallback
(
module
->
module
_n
ame
,
if
(
!
EnumModulesCallback
(
module
->
module
.
ModuleN
ame
,
module
->
module
.
BaseOfImage
,
UserContext
))
break
;
}
...
...
include/dbghelp.h
View file @
f1436139
...
...
@@ -764,6 +764,8 @@ typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PSTR, ULONG, PVOID);
BOOL
WINAPI
SymEnumerateModules
(
HANDLE
,
PSYM_ENUMMODULES_CALLBACK
,
PVOID
);
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMMODULES_CALLBACK64
)(
PSTR
,
DWORD64
,
PVOID
);
BOOL
WINAPI
SymEnumerateModules64
(
HANDLE
,
PSYM_ENUMMODULES_CALLBACK64
,
PVOID
);
typedef
BOOL
(
CALLBACK
*
PSYM_ENUMMODULES_CALLBACKW64
)(
PWSTR
,
DWORD64
,
PVOID
);
BOOL
WINAPI
SymEnumerateModulesW64
(
HANDLE
,
PSYM_ENUMMODULES_CALLBACKW64
,
PVOID
);
BOOL
WINAPI
SymGetModuleInfo
(
HANDLE
,
DWORD
,
PIMAGEHLP_MODULE
);
BOOL
WINAPI
SymGetModuleInfoW
(
HANDLE
,
DWORD
,
PIMAGEHLP_MODULEW
);
BOOL
WINAPI
SymGetModuleInfo64
(
HANDLE
,
DWORD64
,
PIMAGEHLP_MODULE64
);
...
...
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