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
e254a1d9
Commit
e254a1d9
authored
Jan 17, 2008
by
Eric van Beurden
Committed by
Alexandre Julliard
Jan 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Wrap TRACE strings using the debugstr functions and update some type casting.
parent
a5a35ec2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
pe_module.c
dlls/dbghelp/pe_module.c
+19
-15
No files found.
dlls/dbghelp/pe_module.c
View file @
e254a1d9
...
...
@@ -40,7 +40,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
* its debugging information)
*/
static
BOOL
pe_load_stabs
(
const
struct
process
*
pcs
,
struct
module
*
module
,
const
void
*
mapping
,
IMAGE_NT_HEADERS
*
nth
)
void
*
mapping
,
IMAGE_NT_HEADERS
*
nth
)
{
IMAGE_SECTION_HEADER
*
section
;
int
i
,
stabsize
=
0
,
stabstrsize
=
0
;
...
...
@@ -67,11 +67,13 @@ static BOOL pe_load_stabs(const struct process* pcs, struct module* module,
{
ret
=
stabs_parse
(
module
,
module
->
module
.
BaseOfImage
-
nth
->
OptionalHeader
.
ImageBase
,
RtlImageRvaToVa
(
nth
,
(
void
*
)
mapping
,
stabs
,
NULL
),
RtlImageRvaToVa
(
nth
,
mapping
,
stabs
,
NULL
),
stabsize
,
RtlImageRvaToVa
(
nth
,
(
void
*
)
mapping
,
stabstr
,
NULL
),
RtlImageRvaToVa
(
nth
,
mapping
,
stabstr
,
NULL
),
stabstrsize
);
}
TRACE
(
"%s the STABS debug info
\n
"
,
ret
?
"successfully loaded"
:
"failed to load"
);
return
ret
;
}
...
...
@@ -96,7 +98,7 @@ static BOOL pe_load_dbg_file(const struct process* pcs, struct module* module,
const
IMAGE_DEBUG_DIRECTORY
*
dbg
;
BOOL
ret
=
FALSE
;
WINE_TRACE
(
"Processing DBG file %s
\n
"
,
d
bg_name
);
WINE_TRACE
(
"Processing DBG file %s
\n
"
,
d
ebugstr_a
(
dbg_name
)
);
if
(
SymFindFileInPath
(
pcs
->
handle
,
NULL
,
dbg_name
,
NULL
,
0
,
0
,
0
,
tmp
,
dbg_match
,
NULL
)
&&
(
hFile
=
CreateFileA
(
tmp
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
...
...
@@ -108,7 +110,7 @@ static BOOL pe_load_dbg_file(const struct process* pcs, struct module* module,
if
(
hdr
->
TimeDateStamp
!=
timestamp
)
{
WINE_ERR
(
"Warning - %s has incorrect internal timestamp
\n
"
,
d
bg_name
);
d
ebugstr_a
(
dbg_name
)
);
/*
* Well, sometimes this happens to DBG files which ARE REALLY the
* right .DBG files but nonetheless this check fails. Anyway,
...
...
@@ -136,7 +138,7 @@ static BOOL pe_load_dbg_file(const struct process* pcs, struct module* module,
ERR
(
"Wrong signature in .DBG file %s
\n
"
,
debugstr_a
(
tmp
));
}
else
WINE_ERR
(
"-Unable to peruse .DBG file %s (%s)
\n
"
,
d
bg_name
,
debugstr_a
(
tmp
));
WINE_ERR
(
"-Unable to peruse .DBG file %s (%s)
\n
"
,
d
ebugstr_a
(
dbg_name
)
,
debugstr_a
(
tmp
));
if
(
dbg_mapping
)
UnmapViewOfFile
(
dbg_mapping
);
if
(
hMap
)
CloseHandle
(
hMap
);
...
...
@@ -151,7 +153,7 @@ static BOOL pe_load_dbg_file(const struct process* pcs, struct module* module,
*/
static
BOOL
pe_load_msc_debug_info
(
const
struct
process
*
pcs
,
struct
module
*
module
,
const
void
*
mapping
,
IMAGE_NT_HEADERS
*
nth
)
void
*
mapping
,
IMAGE_NT_HEADERS
*
nth
)
{
BOOL
ret
=
FALSE
;
const
IMAGE_DATA_DIRECTORY
*
dir
;
...
...
@@ -163,7 +165,7 @@ static BOOL pe_load_msc_debug_info(const struct process* pcs,
nDbg
=
dir
->
Size
/
sizeof
(
IMAGE_DEBUG_DIRECTORY
);
if
(
!
nDbg
)
return
FALSE
;
dbg
=
RtlImageRvaToVa
(
nth
,
(
void
*
)
mapping
,
dir
->
VirtualAddress
,
NULL
);
dbg
=
RtlImageRvaToVa
(
nth
,
mapping
,
dir
->
VirtualAddress
,
NULL
);
/* Parse debug directory */
if
(
nth
->
FileHeader
.
Characteristics
&
IMAGE_FILE_DEBUG_STRIPPED
)
...
...
@@ -199,7 +201,7 @@ static BOOL pe_load_msc_debug_info(const struct process* pcs,
*/
static
BOOL
pe_load_export_debug_info
(
const
struct
process
*
pcs
,
struct
module
*
module
,
const
void
*
mapping
,
IMAGE_NT_HEADERS
*
nth
)
void
*
mapping
,
IMAGE_NT_HEADERS
*
nth
)
{
unsigned
int
i
;
const
IMAGE_EXPORT_DIRECTORY
*
exports
;
...
...
@@ -229,13 +231,13 @@ static BOOL pe_load_export_debug_info(const struct process* pcs,
for (i = 0; i < nth->FileHeader.NumberOfSections; i++, section++)
{
symt_new_public(module, NULL, section->Name,
RtlImageRvaToVa(nth,
(void*)
mapping, section->VirtualAddress, NULL),
RtlImageRvaToVa(nth, mapping, section->VirtualAddress, NULL),
1, TRUE /* FIXME */, TRUE /* FIXME */);
}
#endif
/* Add exported functions */
if
((
exports
=
RtlImageDirectoryEntryToData
(
(
void
*
)
mapping
,
FALSE
,
if
((
exports
=
RtlImageDirectoryEntryToData
(
mapping
,
FALSE
,
IMAGE_DIRECTORY_ENTRY_EXPORT
,
&
size
)))
{
const
WORD
*
ordinals
=
NULL
;
...
...
@@ -244,9 +246,9 @@ static BOOL pe_load_export_debug_info(const struct process* pcs,
unsigned
int
j
;
char
buffer
[
16
];
functions
=
RtlImageRvaToVa
(
nth
,
(
void
*
)
mapping
,
exports
->
AddressOfFunctions
,
NULL
);
ordinals
=
RtlImageRvaToVa
(
nth
,
(
void
*
)
mapping
,
exports
->
AddressOfNameOrdinals
,
NULL
);
names
=
RtlImageRvaToVa
(
nth
,
(
void
*
)
mapping
,
exports
->
AddressOfNames
,
NULL
);
functions
=
RtlImageRvaToVa
(
nth
,
mapping
,
exports
->
AddressOfFunctions
,
NULL
);
ordinals
=
RtlImageRvaToVa
(
nth
,
mapping
,
exports
->
AddressOfNameOrdinals
,
NULL
);
names
=
RtlImageRvaToVa
(
nth
,
mapping
,
exports
->
AddressOfNames
,
NULL
);
if
(
functions
&&
ordinals
&&
names
)
{
...
...
@@ -254,7 +256,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs,
{
if
(
!
names
[
i
])
continue
;
symt_new_public
(
module
,
NULL
,
RtlImageRvaToVa
(
nth
,
(
void
*
)
mapping
,
names
[
i
],
NULL
),
RtlImageRvaToVa
(
nth
,
mapping
,
names
[
i
],
NULL
),
base
+
functions
[
ordinals
[
i
]],
1
,
TRUE
/* FIXME */
,
TRUE
/* FIXME */
);
}
...
...
@@ -369,6 +371,8 @@ struct module* pe_load_native_module(struct process* pcs, const WCHAR* name,
else
pe_load_debug_info
(
pcs
,
module
);
}
else
ERR
(
"could not load the module '%s'
\n
"
,
debugstr_w
(
loaded_name
));
}
UnmapViewOfFile
(
mapping
);
}
...
...
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