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
2ed8b9f6
Commit
2ed8b9f6
authored
Mar 20, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Added helper to image_file_map to map also directory out of PE executables.
parent
3428b94a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+3
-0
pe_module.c
dlls/dbghelp/pe_module.c
+29
-0
No files found.
dlls/dbghelp/dbghelp_private.h
View file @
2ed8b9f6
...
...
@@ -570,6 +570,9 @@ extern struct module*
DWORD64
base
,
DWORD64
size
);
extern
BOOL
pe_load_debug_info
(
const
struct
process
*
pcs
,
struct
module
*
module
);
extern
const
char
*
pe_map_directory
(
struct
module
*
module
,
int
dirno
,
DWORD
*
size
);
extern
void
pe_unmap_directoy
(
struct
module
*
module
,
int
dirno
);
/* source.c */
extern
unsigned
source_new
(
struct
module
*
module
,
const
char
*
basedir
,
const
char
*
source
);
extern
const
char
*
source_get
(
const
struct
module
*
module
,
unsigned
idx
);
...
...
dlls/dbghelp/pe_module.c
View file @
2ed8b9f6
...
...
@@ -257,6 +257,35 @@ static void pe_unmap_file(struct image_file_map* fmap)
}
}
/******************************************************************
* pe_map_directory
*
* Maps a directory content out of a PE file
*/
const
char
*
pe_map_directory
(
struct
module
*
module
,
int
dirno
,
DWORD
*
size
)
{
IMAGE_NT_HEADERS
*
nth
;
void
*
mapping
;
if
(
module
->
type
!=
DMT_PE
||
!
module
->
format_info
[
DFI_PE
])
return
NULL
;
if
(
dirno
>=
IMAGE_NUMBEROF_DIRECTORY_ENTRIES
||
!
(
mapping
=
pe_map_full
(
&
module
->
format_info
[
DFI_PE
]
->
u
.
pe_info
->
fmap
,
&
nth
)))
return
NULL
;
if
(
size
)
*
size
=
nth
->
OptionalHeader
.
DataDirectory
[
dirno
].
Size
;
return
RtlImageRvaToVa
(
nth
,
mapping
,
nth
->
OptionalHeader
.
DataDirectory
[
dirno
].
VirtualAddress
,
NULL
);
}
/******************************************************************
* pe_unmap_directory
*
* Unmaps a directory content
*/
void
pe_unmap_directory
(
struct
image_file_map
*
fmap
,
int
dirno
)
{
pe_unmap_full
(
fmap
);
}
static
void
pe_module_remove
(
struct
process
*
pcs
,
struct
module_format
*
modfmt
)
{
pe_unmap_file
(
&
modfmt
->
u
.
pe_info
->
fmap
);
...
...
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