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
d945c1ea
Commit
d945c1ea
authored
Mar 20, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Also print the thunk address for ordinal imports.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32b365c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
pe.c
tools/winedump/pe.c
+6
-6
No files found.
tools/winedump/pe.c
View file @
d945c1ea
...
@@ -1193,14 +1193,14 @@ static void dump_image_thunk_data64(const IMAGE_THUNK_DATA64 *il, DWORD thunk_rv
...
@@ -1193,14 +1193,14 @@ static void dump_image_thunk_data64(const IMAGE_THUNK_DATA64 *il, DWORD thunk_rv
for
(;
il
->
u1
.
Ordinal
;
il
++
,
thunk_rva
+=
sizeof
(
LONGLONG
))
for
(;
il
->
u1
.
Ordinal
;
il
++
,
thunk_rva
+=
sizeof
(
LONGLONG
))
{
{
if
(
IMAGE_SNAP_BY_ORDINAL64
(
il
->
u1
.
Ordinal
))
if
(
IMAGE_SNAP_BY_ORDINAL64
(
il
->
u1
.
Ordinal
))
printf
(
" %
4u <by ordinal>
\n
"
,
(
DWORD
)
IMAGE_ORDINAL64
(
il
->
u1
.
Ordinal
));
printf
(
" %
08x %4u <by ordinal>
\n
"
,
thunk_rva
,
(
DWORD
)
IMAGE_ORDINAL64
(
il
->
u1
.
Ordinal
));
else
else
{
{
iibn
=
RVA
((
DWORD
)
il
->
u1
.
AddressOfData
,
sizeof
(
DWORD
));
iibn
=
RVA
((
DWORD
)
il
->
u1
.
AddressOfData
,
sizeof
(
DWORD
));
if
(
!
iibn
)
if
(
!
iibn
)
printf
(
"Can't grab import by name info, skipping to next ordinal
\n
"
);
printf
(
"Can't grab import by name info, skipping to next ordinal
\n
"
);
else
else
printf
(
" %
4u %s %x
\n
"
,
iibn
->
Hint
,
iibn
->
Name
,
thunk_rva
);
printf
(
" %
08x %4u %s
\n
"
,
thunk_rva
,
iibn
->
Hint
,
iibn
->
Name
);
}
}
}
}
}
}
...
@@ -1211,14 +1211,14 @@ static void dump_image_thunk_data32(const IMAGE_THUNK_DATA32 *il, int offset, DW
...
@@ -1211,14 +1211,14 @@ static void dump_image_thunk_data32(const IMAGE_THUNK_DATA32 *il, int offset, DW
for
(;
il
->
u1
.
Ordinal
;
il
++
,
thunk_rva
+=
sizeof
(
DWORD
))
for
(;
il
->
u1
.
Ordinal
;
il
++
,
thunk_rva
+=
sizeof
(
DWORD
))
{
{
if
(
IMAGE_SNAP_BY_ORDINAL32
(
il
->
u1
.
Ordinal
))
if
(
IMAGE_SNAP_BY_ORDINAL32
(
il
->
u1
.
Ordinal
))
printf
(
" %
4u <by ordinal>
\n
"
,
IMAGE_ORDINAL32
(
il
->
u1
.
Ordinal
));
printf
(
" %
08x %4u <by ordinal>
\n
"
,
thunk_rva
,
IMAGE_ORDINAL32
(
il
->
u1
.
Ordinal
));
else
else
{
{
iibn
=
RVA
((
DWORD
)
il
->
u1
.
AddressOfData
-
offset
,
sizeof
(
DWORD
));
iibn
=
RVA
((
DWORD
)
il
->
u1
.
AddressOfData
-
offset
,
sizeof
(
DWORD
));
if
(
!
iibn
)
if
(
!
iibn
)
printf
(
"Can't grab import by name info, skipping to next ordinal
\n
"
);
printf
(
"Can't grab import by name info, skipping to next ordinal
\n
"
);
else
else
printf
(
" %
4u %s %x
\n
"
,
iibn
->
Hint
,
iibn
->
Name
,
thunk_rva
);
printf
(
" %
08x %4u %s
\n
"
,
thunk_rva
,
iibn
->
Hint
,
iibn
->
Name
);
}
}
}
}
}
}
...
@@ -1245,7 +1245,7 @@ static void dump_dir_imported_functions(void)
...
@@ -1245,7 +1245,7 @@ static void dump_dir_imported_functions(void)
printf
(
" ForwarderChain: %08X
\n
"
,
importDesc
->
ForwarderChain
);
printf
(
" ForwarderChain: %08X
\n
"
,
importDesc
->
ForwarderChain
);
printf
(
" First thunk RVA: %08X
\n
"
,
(
DWORD
)
importDesc
->
FirstThunk
);
printf
(
" First thunk RVA: %08X
\n
"
,
(
DWORD
)
importDesc
->
FirstThunk
);
printf
(
" Ordn Name
\n
"
);
printf
(
"
Thunk
Ordn Name
\n
"
);
il
=
(
importDesc
->
u
.
OriginalFirstThunk
!=
0
)
?
il
=
(
importDesc
->
u
.
OriginalFirstThunk
!=
0
)
?
RVA
((
DWORD
)
importDesc
->
u
.
OriginalFirstThunk
,
sizeof
(
DWORD
))
:
RVA
((
DWORD
)
importDesc
->
u
.
OriginalFirstThunk
,
sizeof
(
DWORD
))
:
...
@@ -1335,7 +1335,7 @@ static void dump_dir_delay_imported_functions(void)
...
@@ -1335,7 +1335,7 @@ static void dump_dir_delay_imported_functions(void)
printf
(
" TimeDateStamp: %08X (%s)
\n
"
,
printf
(
" TimeDateStamp: %08X (%s)
\n
"
,
importDesc
->
TimeDateStamp
,
get_time_str
(
importDesc
->
TimeDateStamp
));
importDesc
->
TimeDateStamp
,
get_time_str
(
importDesc
->
TimeDateStamp
));
printf
(
" Ordn Name
\n
"
);
printf
(
"
Thunk
Ordn Name
\n
"
);
il
=
RVA
(
importDesc
->
ImportNameTableRVA
-
offset
,
sizeof
(
DWORD
));
il
=
RVA
(
importDesc
->
ImportNameTableRVA
-
offset
,
sizeof
(
DWORD
));
...
...
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