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
33c8ffc3
Commit
33c8ffc3
authored
Feb 21, 2007
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 22, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Added helper to define the module's name.
parent
a85895d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+2
-0
module.c
dlls/dbghelp/module.c
+8
-4
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
33c8ffc3
...
@@ -447,6 +447,8 @@ extern enum module_type
...
@@ -447,6 +447,8 @@ extern enum module_type
extern
void
module_reset_debug_info
(
struct
module
*
module
);
extern
void
module_reset_debug_info
(
struct
module
*
module
);
extern
BOOL
module_remove
(
struct
process
*
pcs
,
extern
BOOL
module_remove
(
struct
process
*
pcs
,
struct
module
*
module
);
struct
module
*
module
);
extern
void
module_set_module
(
struct
module
*
module
,
const
char
*
name
);
/* msc.c */
/* msc.c */
extern
BOOL
pe_load_debug_directory
(
const
struct
process
*
pcs
,
extern
BOOL
pe_load_debug_directory
(
const
struct
process
*
pcs
,
struct
module
*
module
,
struct
module
*
module
,
...
...
dlls/dbghelp/module.c
View file @
33c8ffc3
...
@@ -79,6 +79,11 @@ static void module_fill_module(const char* in, char* out, size_t size)
...
@@ -79,6 +79,11 @@ static void module_fill_module(const char* in, char* out, size_t size)
while
((
*
out
=
tolower
(
*
out
)))
out
++
;
while
((
*
out
=
tolower
(
*
out
)))
out
++
;
}
}
void
module_set_module
(
struct
module
*
module
,
const
char
*
name
)
{
module_fill_module
(
name
,
module
->
module
.
ModuleName
,
sizeof
(
module
->
module
.
ModuleName
));
}
static
const
char
*
get_module_type
(
enum
module_type
type
,
BOOL
virtual
)
static
const
char
*
get_module_type
(
enum
module_type
type
,
BOOL
virtual
)
{
{
switch
(
type
)
switch
(
type
)
...
@@ -116,8 +121,7 @@ struct module* module_new(struct process* pcs, const char* name,
...
@@ -116,8 +121,7 @@ struct module* module_new(struct process* pcs, const char* name,
module
->
module
.
SizeOfStruct
=
sizeof
(
module
->
module
);
module
->
module
.
SizeOfStruct
=
sizeof
(
module
->
module
);
module
->
module
.
BaseOfImage
=
mod_addr
;
module
->
module
.
BaseOfImage
=
mod_addr
;
module
->
module
.
ImageSize
=
size
;
module
->
module
.
ImageSize
=
size
;
module_fill_module
(
name
,
module
->
module
.
ModuleName
,
module_set_module
(
module
,
name
);
sizeof
(
module
->
module
.
ModuleName
));
module
->
module
.
ImageName
[
0
]
=
'\0'
;
module
->
module
.
ImageName
[
0
]
=
'\0'
;
lstrcpynA
(
module
->
module
.
LoadedImageName
,
name
,
sizeof
(
module
->
module
.
LoadedImageName
));
lstrcpynA
(
module
->
module
.
LoadedImageName
,
name
,
sizeof
(
module
->
module
.
LoadedImageName
));
module
->
module
.
SymType
=
SymNone
;
module
->
module
.
SymType
=
SymNone
;
...
@@ -423,7 +427,7 @@ done:
...
@@ -423,7 +427,7 @@ done:
* of ImageName. Overwrite it, if we have better information
* of ImageName. Overwrite it, if we have better information
*/
*/
if
(
ModuleName
)
if
(
ModuleName
)
lstrcpynA
(
module
->
module
.
ModuleName
,
ModuleName
,
sizeof
(
module
->
module
.
ModuleName
)
);
module_set_module
(
module
,
ModuleName
);
lstrcpynA
(
module
->
module
.
ImageName
,
ImageName
,
sizeof
(
module
->
module
.
ImageName
));
lstrcpynA
(
module
->
module
.
ImageName
,
ImageName
,
sizeof
(
module
->
module
.
ImageName
));
return
module
->
module
.
BaseOfImage
;
return
module
->
module
.
BaseOfImage
;
...
@@ -453,7 +457,7 @@ DWORD64 WINAPI SymLoadModuleEx(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
...
@@ -453,7 +457,7 @@ DWORD64 WINAPI SymLoadModuleEx(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
(
DWORD
)
BaseOfDll
,
DllSize
,
0
,
0
);
(
DWORD
)
BaseOfDll
,
DllSize
,
0
,
0
);
if
(
!
module
)
return
FALSE
;
if
(
!
module
)
return
FALSE
;
if
(
ModuleName
)
if
(
ModuleName
)
lstrcpynA
(
module
->
module
.
ModuleName
,
ModuleName
,
sizeof
(
module
->
module
.
ModuleName
)
);
module_set_module
(
module
,
ModuleName
);
module
->
module
.
SymType
=
SymVirtual
;
module
->
module
.
SymType
=
SymVirtual
;
return
TRUE
;
return
TRUE
;
...
...
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