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
1c238c77
Commit
1c238c77
authored
Dec 23, 2009
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Add support for long section names (at least used by MinGW).
parent
02c06f0d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
lib.c
tools/winedump/lib.c
+1
-1
pe.c
tools/winedump/pe.c
+18
-4
winedump.h
tools/winedump/winedump.h
+1
-1
No files found.
tools/winedump/lib.c
View file @
1c238c77
...
...
@@ -88,7 +88,7 @@ static void dump_long_import(const void *base, const IMAGE_SECTION_HEADER *ish,
for
(
i
=
0
;
i
<
num_sect
;
i
++
)
{
if
(
globals
.
do_dumpheader
)
dump_section
(
&
ish
[
i
]);
dump_section
(
&
ish
[
i
]
,
NULL
);
if
(
globals
.
do_dump_rawdata
)
{
...
...
tools/winedump/pe.c
View file @
1c238c77
...
...
@@ -371,10 +371,14 @@ static void dump_pe_header(void)
dump_optional_header
((
const
IMAGE_OPTIONAL_HEADER32
*
)
&
PE_nt_headers
->
OptionalHeader
,
PE_nt_headers
->
FileHeader
.
SizeOfOptionalHeader
);
}
void
dump_section
(
const
IMAGE_SECTION_HEADER
*
sectHead
)
void
dump_section
(
const
IMAGE_SECTION_HEADER
*
sectHead
,
const
char
*
strtable
)
{
printf
(
" %-8.8s VirtSize: 0x%08x VirtAddr: 0x%08x
\n
"
,
sectHead
->
Name
,
sectHead
->
Misc
.
VirtualSize
,
sectHead
->
VirtualAddress
);
if
(
strtable
&&
sectHead
->
Name
[
0
]
==
'/'
)
/* long section name */
printf
(
" %.8s (%s)"
,
sectHead
->
Name
,
strtable
+
atoi
((
const
char
*
)
sectHead
->
Name
+
1
));
else
printf
(
" %-8.8s"
,
sectHead
->
Name
);
printf
(
" VirtSize: 0x%08x VirtAddr: 0x%08x
\n
"
,
sectHead
->
Misc
.
VirtualSize
,
sectHead
->
VirtualAddress
);
printf
(
" raw data offs: 0x%08x raw data size: 0x%08x
\n
"
,
sectHead
->
PointerToRawData
,
sectHead
->
SizeOfRawData
);
printf
(
" relocation offs: 0x%08x relocations: 0x%08x
\n
"
,
...
...
@@ -448,11 +452,21 @@ static void dump_sections(const void *base, const void* addr, unsigned num_sect)
{
const
IMAGE_SECTION_HEADER
*
sectHead
=
addr
;
unsigned
i
;
const
char
*
strtable
;
if
(
PE_nt_headers
->
FileHeader
.
PointerToSymbolTable
&&
PE_nt_headers
->
FileHeader
.
NumberOfSymbols
)
{
/* FIXME: no way to get strtable size */
strtable
=
(
const
char
*
)
base
+
PE_nt_headers
->
FileHeader
.
PointerToSymbolTable
+
PE_nt_headers
->
FileHeader
.
NumberOfSymbols
*
sizeof
(
IMAGE_SYMBOL
);
}
else
strtable
=
NULL
;
printf
(
"Section Table
\n
"
);
for
(
i
=
0
;
i
<
num_sect
;
i
++
,
sectHead
++
)
{
dump_section
(
sectHead
);
dump_section
(
sectHead
,
strtable
);
if
(
globals
.
do_dump_rawdata
)
{
...
...
tools/winedump/winedump.h
View file @
1c238c77
...
...
@@ -234,7 +234,7 @@ const char* get_guid_str(const GUID* guid);
const
char
*
get_symbol_str
(
const
char
*
symname
);
void
dump_file_header
(
const
IMAGE_FILE_HEADER
*
);
void
dump_optional_header
(
const
IMAGE_OPTIONAL_HEADER32
*
,
UINT
);
void
dump_section
(
const
IMAGE_SECTION_HEADER
*
);
void
dump_section
(
const
IMAGE_SECTION_HEADER
*
,
const
char
*
strtable
);
enum
FileSig
get_kind_exec
(
void
);
void
dos_dump
(
void
);
...
...
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