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
2d338e22
Commit
2d338e22
authored
Nov 24, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Display PE section offsets using their virtual address.
parent
2328a1d9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
dump.c
tools/winedump/dump.c
+8
-3
pe.c
tools/winedump/pe.c
+2
-1
winedump.h
tools/winedump/winedump.h
+1
-0
No files found.
tools/winedump/dump.c
View file @
2d338e22
...
@@ -33,11 +33,11 @@
...
@@ -33,11 +33,11 @@
void
*
dump_base
=
NULL
;
void
*
dump_base
=
NULL
;
size_t
dump_total_len
=
0
;
size_t
dump_total_len
=
0
;
void
dump_data
(
const
unsigned
char
*
ptr
,
unsigned
int
size
,
const
char
*
prefix
)
void
dump_data
_offset
(
const
unsigned
char
*
ptr
,
unsigned
int
size
,
unsigned
int
offset
,
const
char
*
prefix
)
{
{
unsigned
int
i
,
j
;
unsigned
int
i
,
j
;
printf
(
"%s%08x: "
,
prefix
,
0
);
printf
(
"%s%08x: "
,
prefix
,
offset
);
if
(
!
ptr
)
if
(
!
ptr
)
{
{
printf
(
"NULL
\n
"
);
printf
(
"NULL
\n
"
);
...
@@ -51,7 +51,7 @@ void dump_data( const unsigned char *ptr, unsigned int size, const char *prefix
...
@@ -51,7 +51,7 @@ void dump_data( const unsigned char *ptr, unsigned int size, const char *prefix
printf
(
" "
);
printf
(
" "
);
for
(
j
=
0
;
j
<
16
;
j
++
)
for
(
j
=
0
;
j
<
16
;
j
++
)
printf
(
"%c"
,
isprint
(
ptr
[
i
-
15
+
j
])
?
ptr
[
i
-
15
+
j
]
:
'.'
);
printf
(
"%c"
,
isprint
(
ptr
[
i
-
15
+
j
])
?
ptr
[
i
-
15
+
j
]
:
'.'
);
if
(
i
<
size
-
1
)
printf
(
"
\n
%s%08x: "
,
prefix
,
i
+
1
);
if
(
i
<
size
-
1
)
printf
(
"
\n
%s%08x: "
,
prefix
,
offset
+
i
+
1
);
}
}
}
}
if
(
i
%
16
)
if
(
i
%
16
)
...
@@ -63,6 +63,11 @@ void dump_data( const unsigned char *ptr, unsigned int size, const char *prefix
...
@@ -63,6 +63,11 @@ void dump_data( const unsigned char *ptr, unsigned int size, const char *prefix
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
void
dump_data
(
const
unsigned
char
*
ptr
,
unsigned
int
size
,
const
char
*
prefix
)
{
dump_data_offset
(
ptr
,
size
,
0
,
prefix
);
}
static
char
*
dump_want_n
(
unsigned
sz
)
static
char
*
dump_want_n
(
unsigned
sz
)
{
{
static
char
buffer
[
64
*
1024
];
static
char
buffer
[
64
*
1024
];
...
...
tools/winedump/pe.c
View file @
2d338e22
...
@@ -539,7 +539,8 @@ static void dump_sections(const void *base, const void* addr, unsigned num_sect)
...
@@ -539,7 +539,8 @@ static void dump_sections(const void *base, const void* addr, unsigned num_sect)
if
(
globals
.
do_dump_rawdata
)
if
(
globals
.
do_dump_rawdata
)
{
{
dump_data
((
const
unsigned
char
*
)
base
+
sectHead
->
PointerToRawData
,
sectHead
->
SizeOfRawData
,
" "
);
dump_data_offset
((
const
unsigned
char
*
)
base
+
sectHead
->
PointerToRawData
,
sectHead
->
SizeOfRawData
,
sectHead
->
VirtualAddress
,
" "
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
}
}
...
...
tools/winedump/winedump.h
View file @
2d338e22
...
@@ -224,6 +224,7 @@ unsigned long Offset(const void* ptr);
...
@@ -224,6 +224,7 @@ unsigned long Offset(const void* ptr);
typedef
void
(
*
file_dumper
)(
void
);
typedef
void
(
*
file_dumper
)(
void
);
BOOL
dump_analysis
(
const
char
*
,
file_dumper
,
enum
FileSig
);
BOOL
dump_analysis
(
const
char
*
,
file_dumper
,
enum
FileSig
);
void
dump_data_offset
(
const
unsigned
char
*
ptr
,
unsigned
int
size
,
unsigned
int
offset
,
const
char
*
prefix
);
void
dump_data
(
const
unsigned
char
*
ptr
,
unsigned
int
size
,
const
char
*
prefix
);
void
dump_data
(
const
unsigned
char
*
ptr
,
unsigned
int
size
,
const
char
*
prefix
);
const
char
*
get_time_str
(
unsigned
long
);
const
char
*
get_time_str
(
unsigned
long
);
unsigned
int
strlenW
(
const
unsigned
short
*
str
);
unsigned
int
strlenW
(
const
unsigned
short
*
str
);
...
...
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