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
3c070225
Commit
3c070225
authored
Apr 01, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Apr 01, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed module mapping for debug info when PE section is compressed.
parent
9e881be5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
msc.c
debugger/msc.c
+32
-4
No files found.
debugger/msc.c
View file @
3c070225
...
...
@@ -124,6 +124,7 @@ static void* DEBUG_MapDebugInfoFile(const char* name, DWORD offset, DWORD size,
if
((
ret
=
MapViewOfFile
(
*
hMap
,
FILE_MAP_READ
,
0
,
g_offset
,
g_size
))
!=
NULL
)
ret
+=
offset
-
g_offset
;
return
ret
;
}
...
...
@@ -2856,25 +2857,30 @@ static enum DbgInfoLoad DEBUG_ProcessDebugDirectory( DBG_MODULE *module,
/* First, watch out for OMAP data */
for
(
i
=
0
;
i
<
nDbg
;
i
++
)
{
if
(
dbg
[
i
].
Type
==
IMAGE_DEBUG_TYPE_OMAP_FROM_SRC
)
{
module
->
msc_info
->
nomap
=
dbg
[
i
].
SizeOfData
/
sizeof
(
OMAP_DATA
);
module
->
msc_info
->
omapp
=
(
OMAP_DATA
*
)(
file_map
+
dbg
[
i
].
PointerToRawData
);
break
;
}
}
/* Now, try to parse CodeView debug info */
for
(
i
=
0
;
dil
!=
DIL_LOADED
&&
i
<
nDbg
;
i
++
)
{
if
(
dbg
[
i
].
Type
==
IMAGE_DEBUG_TYPE_CODEVIEW
)
{
dil
=
DEBUG_ProcessCodeView
(
module
,
file_map
+
dbg
[
i
].
PointerToRawData
);
}
}
/* If not found, try to parse COFF debug info */
for
(
i
=
0
;
dil
!=
DIL_LOADED
&&
i
<
nDbg
;
i
++
)
{
if
(
dbg
[
i
].
Type
==
IMAGE_DEBUG_TYPE_COFF
)
dil
=
DEBUG_ProcessCoff
(
module
,
file_map
+
dbg
[
i
].
PointerToRawData
);
}
#if 0
/* FIXME: this should be supported... this is the debug information for
* functions compiled without a frame pointer (FPO = frame pointer omission)
...
...
@@ -3032,8 +3038,30 @@ enum DbgInfoLoad DEBUG_RegisterMSCDebugInfo( DBG_MODULE *module, HANDLE hFile,
else
{
/* Debug info is embedded into PE module */
/* FIXME: the nDBG information we're manipulating comes from the debuggee
* address space. However, the following code will be made against the
* version mapped in the debugger address space. There are cases (for example
* when the PE sections are compressed in the file and become decompressed
* in the debuggee address space) where the two don't match.
* Therefore, redo the DBG information lookup with the mapped data
*/
PIMAGE_NT_HEADERS
mpd_nth
=
(
PIMAGE_NT_HEADERS
)(
file_map
+
nth_ofs
);
PIMAGE_DATA_DIRECTORY
mpd_dir
;
PIMAGE_DEBUG_DIRECTORY
mpd_dbg
=
NULL
;
/* sanity checks */
if
(
mpd_nth
->
Signature
!=
IMAGE_NT_SIGNATURE
||
mpd_nth
->
FileHeader
.
NumberOfSections
!=
nth
->
FileHeader
.
NumberOfSections
||
!
(
mpd_nth
->
FileHeader
.
Characteristics
&
IMAGE_FILE_DEBUG_STRIPPED
))
goto
leave
;
mpd_dir
=
mpd_nth
->
OptionalHeader
.
DataDirectory
+
IMAGE_DIRECTORY_ENTRY_DEBUG
;
if
((
mpd_dir
->
Size
/
sizeof
(
IMAGE_DEBUG_DIRECTORY
))
!=
nDbg
)
goto
leave
;
mpd_dbg
=
(
PIMAGE_DEBUG_DIRECTORY
)(
file_map
+
mpd_dir
->
VirtualAddress
);
dil
=
DEBUG_ProcessDebugDirectory
(
module
,
file_map
,
dbg
,
nDbg
);
dil
=
DEBUG_ProcessDebugDirectory
(
module
,
file_map
,
mpd_
dbg
,
nDbg
);
}
...
...
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