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
fdd0ad59
Commit
fdd0ad59
authored
Apr 22, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Enable compilation with long types.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
88c06077
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
220 additions
and
271 deletions
+220
-271
Makefile.in
tools/winedump/Makefile.in
+0
-1
debug.c
tools/winedump/debug.c
+5
-5
dos.c
tools/winedump/dos.c
+1
-1
emf.c
tools/winedump/emf.c
+49
-47
le.c
tools/winedump/le.c
+45
-90
lib.c
tools/winedump/lib.c
+2
-2
mf.c
tools/winedump/mf.c
+2
-2
minidump.c
tools/winedump/minidump.c
+64
-71
ne.c
tools/winedump/ne.c
+2
-2
pdb.c
tools/winedump/pdb.c
+1
-1
pe.c
tools/winedump/pe.c
+49
-49
No files found.
tools/winedump/Makefile.in
View file @
fdd0ad59
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
PROGRAMS
=
winedump
MANPAGES
=
winedump.man.in
SCRIPTS
=
function_grep.pl
...
...
tools/winedump/debug.c
View file @
fdd0ad59
...
...
@@ -538,12 +538,12 @@ void dump_coff_symbol_table(const IMAGE_SYMBOL *coff_symbols, unsigned num_sy
case
IMAGE_SYM_CLASS_LABEL
:
if
(
coff_sym
->
SectionNumber
>
0
)
{
DWORD
base
=
sectHead
[
coff_sym
->
SectionNumber
-
1
].
VirtualAddress
;
UINT
base
=
sectHead
[
coff_sym
->
SectionNumber
-
1
].
VirtualAddress
;
nampnt
=
get_coff_name
(
coff_sym
,
coff_strtab
);
printf
(
"%05d | %02d:%08x [%08x] | %s | %s
\n
"
,
i
,
coff_sym
->
SectionNumber
-
1
,
coff_sym
->
Value
,
base
+
coff_sym
->
Value
,
i
,
coff_sym
->
SectionNumber
-
1
,
(
UINT
)
coff_sym
->
Value
,
base
+
(
UINT
)
coff_sym
->
Value
,
storage_class
(
coff_sym
->
StorageClass
),
nampnt
);
}
break
;
...
...
@@ -595,8 +595,8 @@ void dump_frame_pointer_omission(unsigned long base, unsigned long len)
default:
x
=
NULL
;
break
;
}
printf
(
"%08x-%08x %4u %4u %4u %4u %s%s%s
\n
"
,
fpo
->
ulOffStart
,
fpo
->
ulOffStart
+
fpo
->
cbProcSize
,
fpo
->
cdwLocals
,
fpo
->
cdwParams
,
fpo
->
cbProlog
,
fpo
->
cbRegs
,
(
UINT
)
fpo
->
ulOffStart
,
(
UINT
)(
fpo
->
ulOffStart
+
fpo
->
cbProcSize
)
,
(
UINT
)
fpo
->
cdwLocals
,
fpo
->
cdwParams
,
fpo
->
cbProlog
,
fpo
->
cbRegs
,
x
,
fpo
->
fHasSEH
?
" SEH"
:
""
,
fpo
->
fUseBP
?
" UseBP"
:
""
);
fpo
++
;
}
...
...
tools/winedump/dos.c
View file @
fdd0ad59
...
...
@@ -50,6 +50,6 @@ void dos_dump(void)
printf
(
" Relocation (file): %u
\n
"
,
dh
->
e_lfarlc
);
printf
(
" Overlay number: %u
\n
"
,
dh
->
e_ovno
);
printf
(
" OEM id(info): %x(%x)
\n
"
,
dh
->
e_oemid
,
dh
->
e_oeminfo
);
printf
(
" Offset to ext header: %x
\n
"
,
dh
->
e_lfanew
);
printf
(
" Offset to ext header: %x
\n
"
,
(
UINT
)
dh
->
e_lfanew
);
}
}
tools/winedump/emf.c
View file @
fdd0ad59
...
...
@@ -60,6 +60,12 @@ static const char *debugstr_wn(const WCHAR *wstr, unsigned int n)
return
buf
;
}
static
const
char
*
debugstr_rect
(
const
RECTL
*
rect
)
{
return
strmake
(
"%d,%d - %d,%d"
,
(
UINT
)
rect
->
left
,
(
UINT
)
rect
->
top
,
(
UINT
)
rect
->
right
,
(
UINT
)
rect
->
bottom
);
}
static
unsigned
int
read_int
(
const
unsigned
char
*
buffer
)
{
return
buffer
[
0
]
...
...
@@ -69,7 +75,7 @@ static unsigned int read_int(const unsigned char *buffer)
}
#define EMRCASE(x) case x: printf("%-20s %08x\n", #x, length); break
#define EMRPLUSCASE(x) case x: printf(" %-20s %04x %08x %08x\n", #x,
header->Flags, header->Size,
header->DataSize); break
#define EMRPLUSCASE(x) case x: printf(" %-20s %04x %08x %08x\n", #x,
(UINT)header->Flags, (UINT)header->Size, (UINT)
header->DataSize); break
static
unsigned
offset
=
0
;
...
...
@@ -91,13 +97,15 @@ static int dump_emfrecord(void)
const
ENHMETAHEADER
*
header
=
PRD
(
offset
,
sizeof
(
*
header
));
printf
(
"%-20s %08x
\n
"
,
"EMR_HEADER"
,
length
);
printf
(
"bounds (%
d,%d - %d,%d) frame (%d,%d - %d,%d
) signature %#x version %#x bytes %#x records %#x
\n
"
printf
(
"bounds (%
s) frame (%s
) signature %#x version %#x bytes %#x records %#x
\n
"
"handles %#x reserved %#x palette entries %#x px %dx%d mm %dx%d μm %dx%d opengl %d description %s
\n
"
,
header
->
rclBounds
.
left
,
header
->
rclBounds
.
top
,
header
->
rclBounds
.
right
,
header
->
rclBounds
.
bottom
,
header
->
rclFrame
.
left
,
header
->
rclFrame
.
top
,
header
->
rclFrame
.
right
,
header
->
rclFrame
.
bottom
,
header
->
dSignature
,
header
->
nVersion
,
header
->
nBytes
,
header
->
nRecords
,
header
->
nHandles
,
header
->
sReserved
,
header
->
nPalEntries
,
header
->
szlDevice
.
cx
,
header
->
szlDevice
.
cy
,
header
->
szlMillimeters
.
cx
,
header
->
szlMillimeters
.
cy
,
header
->
szlMicrometers
.
cx
,
header
->
szlMicrometers
.
cy
,
header
->
bOpenGL
,
debugstr_rect
(
&
header
->
rclBounds
),
debugstr_rect
(
&
header
->
rclFrame
),
(
UINT
)
header
->
dSignature
,
(
UINT
)
header
->
nVersion
,
(
UINT
)
header
->
nBytes
,
(
UINT
)
header
->
nRecords
,
(
UINT
)
header
->
nHandles
,
header
->
sReserved
,
(
UINT
)
header
->
nPalEntries
,
(
UINT
)
header
->
szlDevice
.
cx
,
(
UINT
)
header
->
szlDevice
.
cy
,
(
UINT
)
header
->
szlMillimeters
.
cx
,
(
UINT
)
header
->
szlMillimeters
.
cy
,
(
UINT
)
header
->
szlMicrometers
.
cx
,
(
UINT
)
header
->
szlMicrometers
.
cy
,
(
UINT
)
header
->
bOpenGL
,
debugstr_wn
((
LPCWSTR
)((
const
BYTE
*
)
header
+
header
->
offDescription
),
header
->
nDescription
));
break
;
}
...
...
@@ -136,9 +144,7 @@ static int dump_emfrecord(void)
const
EMRINTERSECTCLIPRECT
*
clip
=
PRD
(
offset
,
sizeof
(
*
clip
));
printf
(
"%-20s %08x
\n
"
,
"EMR_INTERSECTCLIPRECT"
,
length
);
printf
(
"rect %d,%d - %d, %d
\n
"
,
clip
->
rclClip
.
left
,
clip
->
rclClip
.
top
,
clip
->
rclClip
.
right
,
clip
->
rclClip
.
bottom
);
printf
(
"rect %s
\n
"
,
debugstr_rect
(
&
clip
->
rclClip
));
break
;
}
...
...
@@ -265,7 +271,8 @@ static int dump_emfrecord(void)
EMRPLUSCASE
(
EmfPlusRecordTotal
);
default:
printf
(
" unknown EMF+ record %x %04x %08x
\n
"
,
header
->
Type
,
header
->
Flags
,
header
->
Size
);
printf
(
" unknown EMF+ record %x %04x %08x
\n
"
,
(
UINT
)
header
->
Type
,
(
UINT
)
header
->
Flags
,
(
UINT
)
header
->
Size
);
break
;
}
...
...
@@ -303,16 +310,16 @@ static int dump_emfrecord(void)
{
const
EMREXTSELECTCLIPRGN
*
clip
=
PRD
(
offset
,
sizeof
(
*
clip
));
const
RGNDATA
*
data
=
(
const
RGNDATA
*
)
clip
->
RgnData
;
DWORD
i
,
rc_count
=
0
;
const
RECT
*
rc
;
UINT
i
,
rc_count
=
0
;
const
RECT
L
*
rc
;
if
(
length
>=
sizeof
(
*
clip
)
+
sizeof
(
*
data
))
rc_count
=
data
->
rdh
.
nCount
;
printf
(
"%-20s %08x
\n
"
,
"EMR_EXTSELECTCLIPRGN"
,
length
);
printf
(
"mode %d, rects %d
\n
"
,
clip
->
iMode
,
rc_count
);
for
(
i
=
0
,
rc
=
(
const
RECT
*
)
data
->
Buffer
;
i
<
rc_count
;
i
++
,
rc
++
)
printf
(
" (%
d,%d)-(%d,%d)"
,
rc
->
left
,
rc
->
top
,
rc
->
right
,
rc
->
bottom
);
printf
(
"mode %d, rects %d
\n
"
,
(
UINT
)
clip
->
iMode
,
rc_count
);
for
(
i
=
0
,
rc
=
(
const
RECT
L
*
)
data
->
Buffer
;
i
<
rc_count
;
i
++
)
printf
(
" (%
s)"
,
debugstr_rect
(
&
rc
[
i
]
)
);
if
(
rc_count
!=
0
)
printf
(
"
\n
"
);
break
;
}
...
...
@@ -325,20 +332,20 @@ static int dump_emfrecord(void)
const
BITMAPINFOHEADER
*
bmih
=
(
const
BITMAPINFOHEADER
*
)((
const
unsigned
char
*
)
blt
+
blt
->
offBmiSrc
);
printf
(
"%-20s %08x
\n
"
,
"EMR_STRETCHBLT"
,
length
);
printf
(
"bounds (%
d,%d - %d,%d
) dst %d,%d %dx%d src %d,%d %dx%d rop %#x xform (%f, %f, %f, %f, %f, %f)
\n
"
printf
(
"bounds (%
s
) dst %d,%d %dx%d src %d,%d %dx%d rop %#x xform (%f, %f, %f, %f, %f, %f)
\n
"
"bk_color %#x usage %#x bmi_offset %#x bmi_size %#x bits_offset %#x bits_size %#x
\n
"
,
blt
->
rclBounds
.
left
,
blt
->
rclBounds
.
top
,
blt
->
rclBounds
.
right
,
blt
->
rclBounds
.
bottom
,
blt
->
xDest
,
blt
->
yDest
,
blt
->
cxDest
,
blt
->
cyDest
,
blt
->
xSrc
,
blt
->
ySrc
,
blt
->
cxSrc
,
blt
->
cySrc
,
blt
->
dwRop
,
debugstr_rect
(
&
blt
->
rclBounds
),
(
UINT
)
blt
->
xDest
,
(
UINT
)
blt
->
yDest
,
(
UINT
)
blt
->
cxDest
,
(
UINT
)
blt
->
cyDest
,
(
UINT
)
blt
->
xSrc
,
(
UINT
)
blt
->
ySrc
,
(
UINT
)
blt
->
cxSrc
,
(
UINT
)
blt
->
cySrc
,
(
UINT
)
blt
->
dwRop
,
blt
->
xformSrc
.
eM11
,
blt
->
xformSrc
.
eM12
,
blt
->
xformSrc
.
eM21
,
blt
->
xformSrc
.
eM22
,
blt
->
xformSrc
.
eDx
,
blt
->
xformSrc
.
eDy
,
blt
->
crBkColorSrc
,
blt
->
iUsageSrc
,
blt
->
offBmiSrc
,
blt
->
cbBmiSrc
,
blt
->
offBitsSrc
,
blt
->
cbBitsSrc
);
(
UINT
)
blt
->
crBkColorSrc
,
(
UINT
)
blt
->
iUsageSrc
,
(
UINT
)
blt
->
offBmiSrc
,
(
UINT
)
blt
->
cbBmiSrc
,
(
UINT
)
blt
->
offBitsSrc
,
(
UINT
)
blt
->
cbBitsSrc
);
printf
(
"BITMAPINFOHEADER biSize %#x biWidth %d biHeight %d biPlanes %d biBitCount %d biCompression %#x
\n
"
"biSizeImage %#x biXPelsPerMeter %d biYPelsPerMeter %d biClrUsed %#x biClrImportant %#x
\n
"
,
bmih
->
biSize
,
bmih
->
biWidth
,
bmih
->
biHeight
,
bmih
->
biPlanes
,
bmih
->
biBitCount
,
bmih
->
biCompression
,
bmih
->
biSizeImage
,
bmih
->
biXPelsPerMeter
,
bmih
->
biYPelsPerMeter
,
bmih
->
biClrUsed
,
bmih
->
biClrImportant
);
(
UINT
)
bmih
->
biSize
,
(
UINT
)
bmih
->
biWidth
,
(
UINT
)
bmih
->
biHeight
,
(
UINT
)
bmih
->
biPlanes
,
(
UINT
)
bmih
->
biBitCount
,
(
UINT
)
bmih
->
biCompression
,
(
UINT
)
bmih
->
biSizeImage
,
(
UINT
)
bmih
->
biXPelsPerMeter
,
(
UINT
)
bmih
->
biYPelsPerMeter
,
(
UINT
)
bmih
->
biClrUsed
,
(
UINT
)
bmih
->
biClrImportant
);
break
;
}
...
...
@@ -354,10 +361,8 @@ static int dump_emfrecord(void)
printf
(
"%-20s %08x
\n
"
,
"EMR_EXTCREATEFONTINDIRECTW"
,
length
);
printf
(
"(%d %d %d %d %x out %d clip %x quality %d charset %d) %s %s %s %s
\n
"
,
plf
->
lfHeight
,
plf
->
lfWidth
,
plf
->
lfEscapement
,
plf
->
lfOrientation
,
plf
->
lfPitchAndFamily
,
plf
->
lfOutPrecision
,
plf
->
lfClipPrecision
,
(
UINT
)
plf
->
lfHeight
,
(
UINT
)
plf
->
lfWidth
,
(
UINT
)
plf
->
lfEscapement
,
(
UINT
)
plf
->
lfOrientation
,
(
UINT
)
plf
->
lfPitchAndFamily
,
(
UINT
)
plf
->
lfOutPrecision
,
(
UINT
)
plf
->
lfClipPrecision
,
plf
->
lfQuality
,
plf
->
lfCharSet
,
debugstr_wn
(
plf
->
lfFaceName
,
LF_FACESIZE
),
plf
->
lfWeight
>
400
?
"Bold"
:
""
,
...
...
@@ -374,15 +379,12 @@ static int dump_emfrecord(void)
const
int
*
dx
=
(
const
int
*
)((
const
BYTE
*
)
etoW
+
etoW
->
emrtext
.
offDx
);
printf
(
"%-20s %08x
\n
"
,
"EMR_EXTTEXTOUTW"
,
length
);
printf
(
"bounds (%d,%d - %d,%d) mode %#x x_scale %f y_scale %f pt (%d,%d) rect (%d,%d - %d,%d) flags %#x, %s
\n
"
,
etoW
->
rclBounds
.
left
,
etoW
->
rclBounds
.
top
,
etoW
->
rclBounds
.
right
,
etoW
->
rclBounds
.
bottom
,
etoW
->
iGraphicsMode
,
etoW
->
exScale
,
etoW
->
eyScale
,
etoW
->
emrtext
.
ptlReference
.
x
,
etoW
->
emrtext
.
ptlReference
.
y
,
etoW
->
emrtext
.
rcl
.
left
,
etoW
->
emrtext
.
rcl
.
top
,
etoW
->
emrtext
.
rcl
.
right
,
etoW
->
emrtext
.
rcl
.
bottom
,
etoW
->
emrtext
.
fOptions
,
printf
(
"bounds (%s) mode %#x x_scale %f y_scale %f pt (%d,%d) rect (%s) flags %#x, %s
\n
"
,
debugstr_rect
(
&
etoW
->
rclBounds
),
(
UINT
)
etoW
->
iGraphicsMode
,
etoW
->
exScale
,
etoW
->
eyScale
,
(
UINT
)
etoW
->
emrtext
.
ptlReference
.
x
,
(
UINT
)
etoW
->
emrtext
.
ptlReference
.
y
,
debugstr_rect
(
&
etoW
->
emrtext
.
rcl
),
(
UINT
)
etoW
->
emrtext
.
fOptions
,
debugstr_wn
((
LPCWSTR
)((
const
BYTE
*
)
etoW
+
etoW
->
emrtext
.
offString
),
etoW
->
emrtext
.
nChars
));
printf
(
"dx_offset %u {"
,
etoW
->
emrtext
.
offDx
);
printf
(
"dx_offset %u {"
,
(
UINT
)
etoW
->
emrtext
.
offDx
);
for
(
i
=
0
;
i
<
etoW
->
emrtext
.
nChars
;
++
i
)
{
printf
(
"%d"
,
dx
[
i
]);
...
...
@@ -429,20 +431,20 @@ static int dump_emfrecord(void)
const
BITMAPINFOHEADER
*
bmih
=
(
const
BITMAPINFOHEADER
*
)((
const
unsigned
char
*
)
blend
+
blend
->
offBmiSrc
);
printf
(
"%-20s %08x
\n
"
,
"EMR_ALPHABLEND"
,
length
);
printf
(
"bounds (%
d,%d - %d,%d
) dst %d,%d %dx%d src %d,%d %dx%d rop %#x xform (%f, %f, %f, %f, %f, %f)
\n
"
printf
(
"bounds (%
s
) dst %d,%d %dx%d src %d,%d %dx%d rop %#x xform (%f, %f, %f, %f, %f, %f)
\n
"
"bk_color %#x usage %#x bmi_offset %#x bmi_size %#x bits_offset %#x bits_size %#x
\n
"
,
blend
->
rclBounds
.
left
,
blend
->
rclBounds
.
top
,
blend
->
rclBounds
.
right
,
blend
->
rclBounds
.
bottom
,
blend
->
xDest
,
blend
->
yDest
,
blend
->
cxDest
,
blend
->
cyDest
,
blend
->
xSrc
,
blend
->
ySrc
,
blend
->
cxSrc
,
blend
->
cySrc
,
blend
->
dwRop
,
blend
->
xformSrc
.
eM11
,
blend
->
xformSrc
.
eM12
,
blend
->
xformSrc
.
eM21
,
debugstr_rect
(
&
blend
->
rclBounds
),
(
UINT
)
blend
->
xDest
,
(
UINT
)
blend
->
yDest
,
(
UINT
)
blend
->
cxDest
,
(
UINT
)
blend
->
cyDest
,
(
UINT
)
blend
->
xSrc
,
(
UINT
)
blend
->
ySrc
,
(
UINT
)
blend
->
cxSrc
,
(
UINT
)
blend
->
cySrc
,
(
UINT
)
blend
->
dwRop
,
blend
->
xformSrc
.
eM11
,
blend
->
xformSrc
.
eM12
,
blend
->
xformSrc
.
eM21
,
blend
->
xformSrc
.
eM22
,
blend
->
xformSrc
.
eDx
,
blend
->
xformSrc
.
eDy
,
blend
->
crBkColorSrc
,
blend
->
iUsageSrc
,
blend
->
offBmiSrc
,
blend
->
cb
BmiSrc
,
blend
->
offBitsSrc
,
blend
->
cbBitsSrc
);
(
UINT
)
blend
->
crBkColorSrc
,
(
UINT
)
blend
->
iUsageSrc
,
(
UINT
)
blend
->
off
BmiSrc
,
(
UINT
)
blend
->
cbBmiSrc
,
(
UINT
)
blend
->
offBitsSrc
,
(
UINT
)
blend
->
cbBitsSrc
);
printf
(
"BITMAPINFOHEADER biSize %#x biWidth %d biHeight %d biPlanes %d biBitCount %d biCompression %#x
\n
"
"biSizeImage %#x biXPelsPerMeter %d biYPelsPerMeter %d biClrUsed %#x biClrImportant %#x
\n
"
,
bmih
->
biSize
,
bmih
->
biWidth
,
bmih
->
biHeight
,
bmih
->
biPlanes
,
bmih
->
biBitCount
,
bmih
->
biCompression
,
bmih
->
biSizeImage
,
bmih
->
biXPelsPerMeter
,
bmih
->
biYPelsPerMeter
,
bmih
->
biClrUsed
,
bmih
->
biClrImportant
);
(
UINT
)
bmih
->
biSize
,
(
UINT
)
bmih
->
biWidth
,
(
UINT
)
bmih
->
biHeight
,
(
UINT
)
bmih
->
biPlanes
,
(
UINT
)
bmih
->
biBitCount
,
(
UINT
)
bmih
->
biCompression
,
(
UINT
)
bmih
->
biSizeImage
,
(
UINT
)
bmih
->
biXPelsPerMeter
,
(
UINT
)
bmih
->
biYPelsPerMeter
,
(
UINT
)
bmih
->
biClrUsed
,
(
UINT
)
bmih
->
biClrImportant
);
break
;
}
...
...
tools/winedump/le.c
View file @
fdd0ad59
...
...
@@ -91,8 +91,7 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le )
le
->
e32_border
==
0
?
"little-indian"
:
"big-endian"
);
printf
(
" Word order: %s
\n
"
,
le
->
e32_worder
==
0
?
"little-indian"
:
"big-endian"
);
printf
(
" Executable format level: %d
\n
"
,
le
->
e32_level
);
printf
(
" Executable format level: %d
\n
"
,
(
UINT
)
le
->
e32_level
);
printf
(
" CPU type: %s
\n
"
,
le
->
e32_cpu
==
0x01
?
"Intel 80286"
:
le
->
e32_cpu
==
0x02
?
"Intel 80386"
:
...
...
@@ -110,10 +109,8 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le )
le
->
e32_os
==
0x03
?
"DOS 4.x"
:
le
->
e32_os
==
0x04
?
"Windows 386"
:
"Unknown"
);
printf
(
" Module version: %d
\n
"
,
le
->
e32_ver
);
printf
(
" Module type flags: %08x
\n
"
,
le
->
e32_mflags
);
printf
(
" Module version: %d
\n
"
,
(
UINT
)
le
->
e32_ver
);
printf
(
" Module type flags: %08x
\n
"
,
(
UINT
)
le
->
e32_mflags
);
if
(
le
->
e32_mflags
&
0x8000
)
{
if
(
le
->
e32_mflags
&
0x0004
)
...
...
@@ -135,90 +132,48 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le )
if
(
le
->
e32_mflags
&
0x8000
)
printf
(
" Module is DLL
\n
"
);
}
printf
(
" Number of memory pages: %d
\n
"
,
le
->
e32_mpages
);
printf
(
" Initial object CS number: %08x
\n
"
,
le
->
e32_startobj
);
printf
(
" Initial EIP: %08x
\n
"
,
le
->
e32_eip
);
printf
(
" Initial object SS number: %08x
\n
"
,
le
->
e32_stackobj
);
printf
(
" Initial ESP: %08x
\n
"
,
le
->
e32_esp
);
printf
(
" Memory page size: %d
\n
"
,
le
->
e32_pagesize
);
printf
(
" Bytes on last page: %d
\n
"
,
le
->
e32_lastpagesize
);
printf
(
" Fix-up section size: %d
\n
"
,
le
->
e32_fixupsize
);
printf
(
" Fix-up section checksum: %08x
\n
"
,
le
->
e32_fixupsum
);
printf
(
" Loader section size: %d
\n
"
,
le
->
e32_ldrsize
);
printf
(
" Loader section checksum: %08x
\n
"
,
le
->
e32_ldrsum
);
printf
(
" Offset of object table: %08x
\n
"
,
le
->
e32_objtab
);
printf
(
" Object table entries: %d
\n
"
,
le
->
e32_objcnt
);
printf
(
" Object page map offset: %08x
\n
"
,
le
->
e32_objmap
);
printf
(
" Object iterate data map offset: %08x
\n
"
,
le
->
e32_itermap
);
printf
(
" Resource table offset: %08x
\n
"
,
le
->
e32_rsrctab
);
printf
(
" Resource table entries: %d
\n
"
,
le
->
e32_rsrccnt
);
printf
(
" Resident names table offset: %08x
\n
"
,
le
->
e32_restab
);
printf
(
" Entry table offset: %08x
\n
"
,
le
->
e32_enttab
);
printf
(
" Module directives table offset: %08x
\n
"
,
le
->
e32_dirtab
);
printf
(
" Module directives entries: %d
\n
"
,
le
->
e32_dircnt
);
printf
(
" Fix-up page table offset: %08x
\n
"
,
le
->
e32_fpagetab
);
printf
(
" Fix-up record table offset: %08x
\n
"
,
le
->
e32_frectab
);
printf
(
" Imported modules name table offset: %08x
\n
"
,
le
->
e32_impmod
);
printf
(
" Imported modules count: %d
\n
"
,
le
->
e32_impmodcnt
);
printf
(
" Imported procedure name table offset: %08x
\n
"
,
le
->
e32_impproc
);
printf
(
" Per-page checksum table offset: %08x
\n
"
,
le
->
e32_pagesum
);
printf
(
" Data pages offset from top of table: %08x
\n
"
,
le
->
e32_datapage
);
printf
(
" Preload page count: %08x
\n
"
,
le
->
e32_preload
);
printf
(
" Non-resident names table offset: %08x
\n
"
,
le
->
e32_nrestab
);
printf
(
" Non-resident names table length: %d
\n
"
,
le
->
e32_cbnrestab
);
printf
(
" Non-resident names table checksum: %08x
\n
"
,
le
->
e32_nressum
);
printf
(
" Automatic data object: %08x
\n
"
,
le
->
e32_autodata
);
printf
(
" Debug information offset: %08x
\n
"
,
le
->
e32_debuginfo
);
printf
(
" Debug information length: %d
\n
"
,
le
->
e32_debuglen
);
printf
(
" Preload instance pages number: %d
\n
"
,
le
->
e32_instpreload
);
printf
(
" Demand instance pages number: %d
\n
"
,
le
->
e32_instdemand
);
printf
(
" Extra heap allocation: %d
\n
"
,
le
->
e32_heapsize
);
printf
(
" VxD resource table offset: %08x
\n
"
,
le
->
e32_winresoff
);
printf
(
" Size of VxD resource table: %d
\n
"
,
le
->
e32_winreslen
);
printf
(
" VxD identifier: %x
\n
"
,
le
->
e32_devid
);
printf
(
" VxD DDK version: %x
\n
"
,
le
->
e32_ddkver
);
printf
(
" Number of memory pages: %d
\n
"
,
(
UINT
)
le
->
e32_mpages
);
printf
(
" Initial object CS number: %08x
\n
"
,
(
UINT
)
le
->
e32_startobj
);
printf
(
" Initial EIP: %08x
\n
"
,
(
UINT
)
le
->
e32_eip
);
printf
(
" Initial object SS number: %08x
\n
"
,
(
UINT
)
le
->
e32_stackobj
);
printf
(
" Initial ESP: %08x
\n
"
,
(
UINT
)
le
->
e32_esp
);
printf
(
" Memory page size: %d
\n
"
,
(
UINT
)
le
->
e32_pagesize
);
printf
(
" Bytes on last page: %d
\n
"
,
(
UINT
)
le
->
e32_lastpagesize
);
printf
(
" Fix-up section size: %d
\n
"
,
(
UINT
)
le
->
e32_fixupsize
);
printf
(
" Fix-up section checksum: %08x
\n
"
,
(
UINT
)
le
->
e32_fixupsum
);
printf
(
" Loader section size: %d
\n
"
,
(
UINT
)
le
->
e32_ldrsize
);
printf
(
" Loader section checksum: %08x
\n
"
,
(
UINT
)
le
->
e32_ldrsum
);
printf
(
" Offset of object table: %08x
\n
"
,
(
UINT
)
le
->
e32_objtab
);
printf
(
" Object table entries: %d
\n
"
,
(
UINT
)
le
->
e32_objcnt
);
printf
(
" Object page map offset: %08x
\n
"
,
(
UINT
)
le
->
e32_objmap
);
printf
(
" Object iterate data map offset: %08x
\n
"
,
(
UINT
)
le
->
e32_itermap
);
printf
(
" Resource table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_rsrctab
);
printf
(
" Resource table entries: %d
\n
"
,
(
UINT
)
le
->
e32_rsrccnt
);
printf
(
" Resident names table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_restab
);
printf
(
" Entry table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_enttab
);
printf
(
" Module directives table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_dirtab
);
printf
(
" Module directives entries: %d
\n
"
,
(
UINT
)
le
->
e32_dircnt
);
printf
(
" Fix-up page table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_fpagetab
);
printf
(
" Fix-up record table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_frectab
);
printf
(
" Imported modules name table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_impmod
);
printf
(
" Imported modules count: %d
\n
"
,
(
UINT
)
le
->
e32_impmodcnt
);
printf
(
" Imported procedure name table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_impproc
);
printf
(
" Per-page checksum table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_pagesum
);
printf
(
" Data pages offset from top of table: %08x
\n
"
,
(
UINT
)
le
->
e32_datapage
);
printf
(
" Preload page count: %08x
\n
"
,
(
UINT
)
le
->
e32_preload
);
printf
(
" Non-resident names table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_nrestab
);
printf
(
" Non-resident names table length: %d
\n
"
,
(
UINT
)
le
->
e32_cbnrestab
);
printf
(
" Non-resident names table checksum: %08x
\n
"
,
(
UINT
)
le
->
e32_nressum
);
printf
(
" Automatic data object: %08x
\n
"
,
(
UINT
)
le
->
e32_autodata
);
printf
(
" Debug information offset: %08x
\n
"
,
(
UINT
)
le
->
e32_debuginfo
);
printf
(
" Debug information length: %d
\n
"
,
(
UINT
)
le
->
e32_debuglen
);
printf
(
" Preload instance pages number: %d
\n
"
,
(
UINT
)
le
->
e32_instpreload
);
printf
(
" Demand instance pages number: %d
\n
"
,
(
UINT
)
le
->
e32_instdemand
);
printf
(
" Extra heap allocation: %d
\n
"
,
(
UINT
)
le
->
e32_heapsize
);
printf
(
" VxD resource table offset: %08x
\n
"
,
(
UINT
)
le
->
e32_winresoff
);
printf
(
" Size of VxD resource table: %d
\n
"
,
(
UINT
)
le
->
e32_winreslen
);
printf
(
" VxD identifier: %x
\n
"
,
(
UINT
)
le
->
e32_devid
);
printf
(
" VxD DDK version: %x
\n
"
,
(
UINT
)
le
->
e32_ddkver
);
}
static
void
dump_le_objects
(
const
IMAGE_VXD_HEADER
*
le
)
...
...
tools/winedump/lib.c
View file @
fdd0ad59
...
...
@@ -53,8 +53,8 @@ static void dump_import_object(const IMPORT_OBJECT_HEADER *ioh)
printf
(
" Version : %X
\n
"
,
ioh
->
Version
);
printf
(
" Machine : %X (%s)
\n
"
,
ioh
->
Machine
,
get_machine_str
(
ioh
->
Machine
));
printf
(
" TimeDateStamp: %08X %s
\n
"
,
ioh
->
TimeDateStamp
,
get_time_str
(
ioh
->
TimeDateStamp
));
printf
(
" SizeOfData : %08X
\n
"
,
ioh
->
SizeOfData
);
printf
(
" TimeDateStamp: %08X %s
\n
"
,
(
UINT
)
ioh
->
TimeDateStamp
,
get_time_str
(
ioh
->
TimeDateStamp
));
printf
(
" SizeOfData : %08X
\n
"
,
(
UINT
)
ioh
->
SizeOfData
);
name
=
(
const
char
*
)
ioh
+
sizeof
(
*
ioh
);
printf
(
" DLL name : %s
\n
"
,
name
+
strlen
(
name
)
+
1
);
printf
(
" Symbol name : %s
\n
"
,
name
);
...
...
tools/winedump/mf.c
View file @
fdd0ad59
...
...
@@ -80,8 +80,8 @@ static int dump_mfrecord(void)
printf
(
"%-20s %08x
\n
"
,
"METAHEADER"
,
size
);
printf
(
"type %d header_size %#x version %#x size %#x object_count %d max_record_size %#x "
"parameter_count %d
\n
"
,
header
->
mtType
,
header
->
mtHeaderSize
*
2
,
header
->
mtVersion
,
header
->
mtSize
*
2
,
header
->
mtNoObjects
,
header
->
mtMaxRecord
*
2
,
header
->
mtNoParameters
);
header
->
mtType
,
header
->
mtHeaderSize
*
2
,
header
->
mtVersion
,
(
UINT
)
header
->
mtSize
*
2
,
header
->
mtNoObjects
,
(
UINT
)
header
->
mtMaxRecord
*
2
,
header
->
mtNoParameters
);
break
;
}
MRCASE
(
META_SETBKCOLOR
);
...
...
tools/winedump/minidump.c
View file @
fdd0ad59
...
...
@@ -71,7 +71,7 @@ enum FileSig get_kind_mdmp(void)
void
mdmp_dump
(
void
)
{
const
MINIDUMP_HEADER
*
hdr
=
PRD
(
0
,
sizeof
(
MINIDUMP_HEADER
));
U
LONG
idx
,
ndir
=
0
;
U
INT
idx
,
ndir
=
0
;
const
MINIDUMP_DIRECTORY
*
dir
;
const
void
*
stream
;
...
...
@@ -81,13 +81,13 @@ void mdmp_dump(void)
return
;
}
printf
(
"Signature: %u (%.4s)
\n
"
,
hdr
->
Signature
,
(
const
char
*
)
&
hdr
->
Signature
);
printf
(
"Version: %x
\n
"
,
hdr
->
Version
);
printf
(
"NumberOfStreams: %u
\n
"
,
hdr
->
NumberOfStreams
);
printf
(
"StreamDirectoryRva: %u
\n
"
,
hdr
->
StreamDirectoryRva
);
printf
(
"CheckSum: %u
\n
"
,
hdr
->
CheckSum
);
printf
(
"Signature: %u (%.4s)
\n
"
,
(
UINT
)
hdr
->
Signature
,
(
const
char
*
)
&
hdr
->
Signature
);
printf
(
"Version: %x
\n
"
,
(
UINT
)
hdr
->
Version
);
printf
(
"NumberOfStreams: %u
\n
"
,
(
UINT
)
hdr
->
NumberOfStreams
);
printf
(
"StreamDirectoryRva: %u
\n
"
,
(
UINT
)
hdr
->
StreamDirectoryRva
);
printf
(
"CheckSum: %u
\n
"
,
(
UINT
)
hdr
->
CheckSum
);
printf
(
"TimeDateStamp: %s
\n
"
,
get_time_str
(
hdr
->
u
.
TimeDateStamp
));
printf
(
"Flags: %x%08x
\n
"
,
(
DWORD
)(
hdr
->
Flags
>>
32
),
(
DWORD
)
hdr
->
Flags
);
printf
(
"Flags: %x%08x
\n
"
,
(
UINT
)(
hdr
->
Flags
>>
32
),
(
UINT
)
hdr
->
Flags
);
for
(
idx
=
0
;
idx
<=
LastReservedStream
;
idx
++
)
{
...
...
@@ -103,20 +103,20 @@ void mdmp_dump(void)
const
MINIDUMP_THREAD
*
mt
=
mtl
->
Threads
;
unsigned
int
i
;
printf
(
"Threads: %u
\n
"
,
mtl
->
NumberOfThreads
);
printf
(
"Threads: %u
\n
"
,
(
UINT
)
mtl
->
NumberOfThreads
);
for
(
i
=
0
;
i
<
mtl
->
NumberOfThreads
;
i
++
,
mt
++
)
{
printf
(
" Thread: #%d
\n
"
,
i
);
printf
(
" ThreadId: %u
\n
"
,
mt
->
ThreadId
);
printf
(
" SuspendCount: %u
\n
"
,
mt
->
SuspendCount
);
printf
(
" PriorityClass: %u
\n
"
,
mt
->
PriorityClass
);
printf
(
" Priority: %u
\n
"
,
mt
->
Priority
);
printf
(
" Teb: 0x%x%08x
\n
"
,
(
DWORD
)(
mt
->
Teb
>>
32
),
(
DWORD
)
mt
->
Teb
);
printf
(
" ThreadId: %u
\n
"
,
(
UINT
)
mt
->
ThreadId
);
printf
(
" SuspendCount: %u
\n
"
,
(
UINT
)
mt
->
SuspendCount
);
printf
(
" PriorityClass: %u
\n
"
,
(
UINT
)
mt
->
PriorityClass
);
printf
(
" Priority: %u
\n
"
,
(
UINT
)
mt
->
Priority
);
printf
(
" Teb: 0x%x%08x
\n
"
,
(
UINT
)(
mt
->
Teb
>>
32
),
(
UINT
)
mt
->
Teb
);
printf
(
" Stack: 0x%x%08x-0x%x%08x
\n
"
,
(
DWORD
)(
mt
->
Stack
.
StartOfMemoryRange
>>
32
),
(
DWORD
)
mt
->
Stack
.
StartOfMemoryRange
,
(
DWORD
)((
mt
->
Stack
.
StartOfMemoryRange
+
mt
->
Stack
.
Memory
.
DataSize
)
>>
32
),
(
DWORD
)(
mt
->
Stack
.
StartOfMemoryRange
+
mt
->
Stack
.
Memory
.
DataSize
));
(
UINT
)(
mt
->
Stack
.
StartOfMemoryRange
>>
32
),
(
UINT
)
mt
->
Stack
.
StartOfMemoryRange
,
(
UINT
)((
mt
->
Stack
.
StartOfMemoryRange
+
mt
->
Stack
.
Memory
.
DataSize
)
>>
32
),
(
UINT
)(
mt
->
Stack
.
StartOfMemoryRange
+
mt
->
Stack
.
Memory
.
DataSize
));
dump_mdmp_data
(
&
mt
->
Stack
.
Memory
,
" "
);
printf
(
" ThreadContext:
\n
"
);
dump_mdmp_data
(
&
mt
->
ThreadContext
,
" "
);
...
...
@@ -134,23 +134,22 @@ void mdmp_dump(void)
printf
(
"Modules (%s): %u
\n
"
,
dir
->
StreamType
==
ModuleListStream
?
"PE"
:
"ELF"
,
mml
->
NumberOfModules
);
(
UINT
)
mml
->
NumberOfModules
);
for
(
i
=
0
;
i
<
mml
->
NumberOfModules
;
i
++
,
mm
++
)
{
printf
(
" Module #%d:
\n
"
,
i
);
printf
(
" BaseOfImage: 0x%x%08x
\n
"
,
(
DWORD
)(
mm
->
BaseOfImage
>>
32
),
(
DWORD
)
mm
->
BaseOfImage
);
printf
(
" SizeOfImage: %u
\n
"
,
mm
->
SizeOfImage
);
printf
(
" CheckSum: %u
\n
"
,
mm
->
CheckSum
);
(
UINT
)(
mm
->
BaseOfImage
>>
32
),
(
UINT
)
mm
->
BaseOfImage
);
printf
(
" SizeOfImage: %u
\n
"
,
(
UINT
)
mm
->
SizeOfImage
);
printf
(
" CheckSum: %u
\n
"
,
(
UINT
)
mm
->
CheckSum
);
printf
(
" TimeDateStamp: %s
\n
"
,
get_time_str
(
mm
->
TimeDateStamp
));
printf
(
" ModuleName: "
);
dump_mdmp_string
(
mm
->
ModuleNameRva
);
printf
(
"
\n
"
);
printf
(
" VersionInfo:
\n
"
);
printf
(
" dwSignature: %x
\n
"
,
mm
->
VersionInfo
.
dwSignature
);
printf
(
" dwStrucVersion: %x
\n
"
,
mm
->
VersionInfo
.
dwStrucVersion
);
printf
(
" dwFileVersion: %d,%d,%d,%d
\n
"
,
printf
(
" dwSignature: %x
\n
"
,
(
UINT
)
mm
->
VersionInfo
.
dwSignature
);
printf
(
" dwStrucVersion: %x
\n
"
,
(
UINT
)
mm
->
VersionInfo
.
dwStrucVersion
);
printf
(
" dwFileVersion: %d,%d,%d,%d
\n
"
,
HIWORD
(
mm
->
VersionInfo
.
dwFileVersionMS
),
LOWORD
(
mm
->
VersionInfo
.
dwFileVersionMS
),
HIWORD
(
mm
->
VersionInfo
.
dwFileVersionLS
),
...
...
@@ -160,9 +159,8 @@ void mdmp_dump(void)
LOWORD
(
mm
->
VersionInfo
.
dwProductVersionMS
),
HIWORD
(
mm
->
VersionInfo
.
dwProductVersionLS
),
LOWORD
(
mm
->
VersionInfo
.
dwProductVersionLS
));
printf
(
" dwFileFlagsMask: %u
\n
"
,
mm
->
VersionInfo
.
dwFileFlagsMask
);
printf
(
" dwFileFlags: %s%s%s%s%s%s
\n
"
,
printf
(
" dwFileFlagsMask: %u
\n
"
,
(
UINT
)
mm
->
VersionInfo
.
dwFileFlagsMask
);
printf
(
" dwFileFlags: %s%s%s%s%s%s
\n
"
,
mm
->
VersionInfo
.
dwFileFlags
&
VS_FF_DEBUG
?
"Debug "
:
""
,
mm
->
VersionInfo
.
dwFileFlags
&
VS_FF_INFOINFERRED
?
"Inferred "
:
""
,
mm
->
VersionInfo
.
dwFileFlags
&
VS_FF_PATCHED
?
"Patched "
:
""
,
...
...
@@ -204,20 +202,19 @@ void mdmp_dump(void)
default:
p1
=
"---"
;
break
;
}
printf
(
" dwFileType: %s
\n
"
,
p1
);
printf
(
" dwFileSubtype: %u
\n
"
,
mm
->
VersionInfo
.
dwFileSubtype
);
printf
(
" dwFileSubtype: %u
\n
"
,
(
UINT
)
mm
->
VersionInfo
.
dwFileSubtype
);
printf
(
" dwFileDate: %x%08x
\n
"
,
mm
->
VersionInfo
.
dwFileDateMS
,
mm
->
VersionInfo
.
dwFileDateLS
);
printf
(
" CvRecord: <%u>
\n
"
,
mm
->
CvRecord
.
DataSize
);
(
UINT
)
mm
->
VersionInfo
.
dwFileDateMS
,
(
UINT
)
mm
->
VersionInfo
.
dwFileDateLS
);
printf
(
" CvRecord: <%u>
\n
"
,
(
UINT
)
mm
->
CvRecord
.
DataSize
);
dump_mdmp_data
(
&
mm
->
CvRecord
,
" "
);
printf
(
" MiscRecord: <%u>
\n
"
,
mm
->
MiscRecord
.
DataSize
);
printf
(
" MiscRecord: <%u>
\n
"
,
(
UINT
)
mm
->
MiscRecord
.
DataSize
);
dump_mdmp_data
(
&
mm
->
MiscRecord
,
" "
);
printf
(
" Reserved0: 0x%x%08x
\n
"
,
(
DWORD
)(
mm
->
Reserved0
>>
32
),
(
DWORD
)
mm
->
Reserved0
);
(
UINT
)(
mm
->
Reserved0
>>
32
),
(
UINT
)
mm
->
Reserved0
);
printf
(
" Reserved1: 0x%x%08x
\n
"
,
(
DWORD
)(
mm
->
Reserved1
>>
32
),
(
DWORD
)
mm
->
Reserved1
);
(
UINT
)(
mm
->
Reserved1
>>
32
),
(
UINT
)
mm
->
Reserved1
);
}
}
}
break
;
case
MemoryListStream
:
{
...
...
@@ -225,17 +222,17 @@ void mdmp_dump(void)
const
MINIDUMP_MEMORY_DESCRIPTOR
*
mmd
=
mml
->
MemoryRanges
;
unsigned
int
i
;
printf
(
"Memory Ranges: %u
\n
"
,
mml
->
NumberOfMemoryRanges
);
printf
(
"Memory Ranges: %u
\n
"
,
(
UINT
)
mml
->
NumberOfMemoryRanges
);
for
(
i
=
0
;
i
<
mml
->
NumberOfMemoryRanges
;
i
++
,
mmd
++
)
{
printf
(
" Memory Range #%d:
\n
"
,
i
);
printf
(
" Range: 0x%x%08x-0x%x%08x
\n
"
,
(
DWORD
)(
mmd
->
StartOfMemoryRange
>>
32
),
(
DWORD
)
mmd
->
StartOfMemoryRange
,
(
DWORD
)((
mmd
->
StartOfMemoryRange
+
mmd
->
Memory
.
DataSize
)
>>
32
),
(
DWORD
)(
mmd
->
StartOfMemoryRange
+
mmd
->
Memory
.
DataSize
));
(
UINT
)(
mmd
->
StartOfMemoryRange
>>
32
),
(
UINT
)
mmd
->
StartOfMemoryRange
,
(
UINT
)((
mmd
->
StartOfMemoryRange
+
mmd
->
Memory
.
DataSize
)
>>
32
),
(
UINT
)(
mmd
->
StartOfMemoryRange
+
mmd
->
Memory
.
DataSize
));
dump_mdmp_data
(
&
mmd
->
Memory
,
" "
);
}
}
}
break
;
case
SystemInfoStream
:
...
...
@@ -371,22 +368,19 @@ void mdmp_dump(void)
break
;
default:
str
=
"???"
;
break
;
}
printf
(
" Version: Windows %s (%u)
\n
"
,
str
,
msi
->
BuildNumber
);
printf
(
" PlatformId: %u
\n
"
,
msi
->
PlatformId
);
printf
(
" Version: Windows %s (%u)
\n
"
,
str
,
(
UINT
)
msi
->
BuildNumber
);
printf
(
" PlatformId: %u
\n
"
,
(
UINT
)
msi
->
PlatformId
);
printf
(
" CSD: "
);
dump_mdmp_string
(
msi
->
CSDVersionRva
);
printf
(
"
\n
"
);
printf
(
" Reserved1: %u
\n
"
,
msi
->
u1
.
Reserved1
);
printf
(
" Reserved1: %u
\n
"
,
(
UINT
)
msi
->
u1
.
Reserved1
);
if
(
msi
->
ProcessorArchitecture
==
PROCESSOR_ARCHITECTURE_INTEL
)
{
printf
(
" x86.VendorId: %.12s
\n
"
,
(
const
char
*
)
msi
->
Cpu
.
X86CpuInfo
.
VendorId
);
printf
(
" x86.VersionInformation: %x
\n
"
,
msi
->
Cpu
.
X86CpuInfo
.
VersionInformation
);
printf
(
" x86.FeatureInformation: %x
\n
"
,
msi
->
Cpu
.
X86CpuInfo
.
FeatureInformation
);
printf
(
" x86.AMDExtendedCpuFeatures: %x
\n
"
,
msi
->
Cpu
.
X86CpuInfo
.
AMDExtendedCpuFeatures
);
printf
(
" x86.VersionInformation: %x
\n
"
,
(
UINT
)
msi
->
Cpu
.
X86CpuInfo
.
VersionInformation
);
printf
(
" x86.FeatureInformation: %x
\n
"
,
(
UINT
)
msi
->
Cpu
.
X86CpuInfo
.
FeatureInformation
);
printf
(
" x86.AMDExtendedCpuFeatures: %x
\n
"
,
(
UINT
)
msi
->
Cpu
.
X86CpuInfo
.
AMDExtendedCpuFeatures
);
}
if
(
sizeof
(
MINIDUMP_SYSTEM_INFO
)
+
4
>
dir
->
Location
.
DataSize
&&
msi
->
CSDVersionRva
>=
dir
->
Location
.
Rva
+
4
)
...
...
@@ -410,17 +404,17 @@ void mdmp_dump(void)
const
MINIDUMP_MISC_INFO
*
mmi
=
(
const
MINIDUMP_MISC_INFO
*
)
stream
;
printf
(
"Misc Information
\n
"
);
printf
(
" Size: %u
\n
"
,
mmi
->
SizeOfInfo
);
printf
(
" Flags: %s%s
\n
"
,
printf
(
" Size: %u
\n
"
,
(
UINT
)
mmi
->
SizeOfInfo
);
printf
(
" Flags: %s%s
\n
"
,
mmi
->
Flags1
&
MINIDUMP_MISC1_PROCESS_ID
?
"ProcessId "
:
""
,
mmi
->
Flags1
&
MINIDUMP_MISC1_PROCESS_TIMES
?
"ProcessTimes "
:
""
);
if
(
mmi
->
Flags1
&
MINIDUMP_MISC1_PROCESS_ID
)
printf
(
" ProcessId: %u
\n
"
,
mmi
->
ProcessId
);
printf
(
" ProcessId: %u
\n
"
,
(
UINT
)
mmi
->
ProcessId
);
if
(
mmi
->
Flags1
&
MINIDUMP_MISC1_PROCESS_TIMES
)
{
printf
(
" ProcessCreateTime: %u
\n
"
,
mmi
->
ProcessCreateTime
);
printf
(
" ProcessUserTime: %u
\n
"
,
mmi
->
ProcessUserTime
);
printf
(
" ProcessKernelTime: %u
\n
"
,
mmi
->
ProcessKernelTime
);
printf
(
" ProcessCreateTime: %u
\n
"
,
(
UINT
)
mmi
->
ProcessCreateTime
);
printf
(
" ProcessUserTime: %u
\n
"
,
(
UINT
)
mmi
->
ProcessUserTime
);
printf
(
" ProcessKernelTime: %u
\n
"
,
(
UINT
)
mmi
->
ProcessKernelTime
);
}
}
break
;
...
...
@@ -430,23 +424,22 @@ void mdmp_dump(void)
unsigned
int
i
;
printf
(
"Exception:
\n
"
);
printf
(
" ThreadId: %08x
\n
"
,
mes
->
ThreadId
);
printf
(
" ThreadId: %08x
\n
"
,
(
UINT
)
mes
->
ThreadId
);
printf
(
" ExceptionRecord:
\n
"
);
printf
(
" ExceptionCode: %u
\n
"
,
mes
->
ExceptionRecord
.
ExceptionCode
);
printf
(
" ExceptionFlags: %u
\n
"
,
mes
->
ExceptionRecord
.
ExceptionFlags
);
printf
(
" ExceptionCode: %u
\n
"
,
(
UINT
)
mes
->
ExceptionRecord
.
ExceptionCode
);
printf
(
" ExceptionFlags: %u
\n
"
,
(
UINT
)
mes
->
ExceptionRecord
.
ExceptionFlags
);
printf
(
" ExceptionRecord: 0x%x%08x
\n
"
,
(
DWORD
)(
mes
->
ExceptionRecord
.
ExceptionRecord
>>
32
),
(
DWORD
)
mes
->
ExceptionRecord
.
ExceptionRecord
);
(
UINT
)(
mes
->
ExceptionRecord
.
ExceptionRecord
>>
32
),
(
UINT
)
mes
->
ExceptionRecord
.
ExceptionRecord
);
printf
(
" ExceptionAddress: 0x%x%08x
\n
"
,
(
DWORD
)(
mes
->
ExceptionRecord
.
ExceptionAddress
>>
32
),
(
DWORD
)(
mes
->
ExceptionRecord
.
ExceptionAddress
));
printf
(
" ExceptionNumberParameters: %u
\n
"
,
mes
->
ExceptionRecord
.
NumberParameters
);
(
UINT
)(
mes
->
ExceptionRecord
.
ExceptionAddress
>>
32
),
(
UINT
)(
mes
->
ExceptionRecord
.
ExceptionAddress
));
printf
(
" ExceptionNumberParameters: %u
\n
"
,
(
UINT
)
mes
->
ExceptionRecord
.
NumberParameters
);
for
(
i
=
0
;
i
<
mes
->
ExceptionRecord
.
NumberParameters
;
i
++
)
{
printf
(
" [%d]: 0x%x%08x
\n
"
,
i
,
(
DWORD
)(
mes
->
ExceptionRecord
.
ExceptionInformation
[
i
]
>>
32
),
(
DWORD
)
mes
->
ExceptionRecord
.
ExceptionInformation
[
i
]);
(
UINT
)(
mes
->
ExceptionRecord
.
ExceptionInformation
[
i
]
>>
32
),
(
UINT
)
mes
->
ExceptionRecord
.
ExceptionInformation
[
i
]);
}
printf
(
" ThreadContext:
\n
"
);
dump_mdmp_data
(
&
mes
->
ThreadContext
,
" "
);
...
...
@@ -454,9 +447,9 @@ void mdmp_dump(void)
break
;
default:
printf
(
"NIY %d
\n
"
,
dir
->
StreamType
);
printf
(
" RVA: %u
\n
"
,
dir
->
Location
.
Rva
);
printf
(
" Size: %u
\n
"
,
dir
->
Location
.
DataSize
);
printf
(
"NIY %d
\n
"
,
(
UINT
)
dir
->
StreamType
);
printf
(
" RVA: %u
\n
"
,
(
UINT
)
dir
->
Location
.
Rva
);
printf
(
" Size: %u
\n
"
,
(
UINT
)
dir
->
Location
.
DataSize
);
dump_mdmp_data
(
&
dir
->
Location
,
" "
);
break
;
}
...
...
tools/winedump/ne.c
View file @
fdd0ad59
...
...
@@ -113,7 +113,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne )
printf
(
"File header:
\n
"
);
printf
(
"Linker version: %d.%d
\n
"
,
ne
->
ne_ver
,
ne
->
ne_rev
);
printf
(
"Entry table: %x len %d
\n
"
,
ne
->
ne_enttab
,
ne
->
ne_cbenttab
);
printf
(
"Checksum: %08x
\n
"
,
ne
->
ne_crc
);
printf
(
"Checksum: %08x
\n
"
,
(
UINT
)
ne
->
ne_crc
);
printf
(
"Flags: %04x
\n
"
,
ne
->
ne_flags
);
printf
(
"Auto data segment: %x
\n
"
,
ne
->
ne_autodata
);
printf
(
"Heap size: %d bytes
\n
"
,
ne
->
ne_heap
);
...
...
@@ -127,7 +127,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne )
printf
(
"Resident name table: %x
\n
"
,
ne
->
ne_restab
);
printf
(
"Module table: %x
\n
"
,
ne
->
ne_modtab
);
printf
(
"Import table: %x
\n
"
,
ne
->
ne_imptab
);
printf
(
"Non-resident table: %x
\n
"
,
ne
->
ne_nrestab
);
printf
(
"Non-resident table: %x
\n
"
,
(
UINT
)
ne
->
ne_nrestab
);
printf
(
"Exe type: %x
\n
"
,
ne
->
ne_exetyp
);
printf
(
"Other flags: %x
\n
"
,
ne
->
ne_flagsothers
);
printf
(
"Fast load area: %x-%x
\n
"
,
ne
->
ne_pretthunks
<<
ne
->
ne_align
,
...
...
tools/winedump/pdb.c
View file @
fdd0ad59
...
...
@@ -711,7 +711,7 @@ static void pdb_dump_fpo(struct pdb_reader* reader, unsigned stream_idx)
for
(
i
=
0
;
i
<
size
;
i
++
)
{
printf
(
"
\t
%08x %08x %4d %4d %7d %4d %6s %c %c
\n
"
,
fpo
[
i
].
ulOffStart
,
fpo
[
i
].
cbProcSize
,
fpo
[
i
].
cdwLocals
,
fpo
[
i
].
cdwParams
,
(
UINT
)
fpo
[
i
].
ulOffStart
,
(
UINT
)
fpo
[
i
].
cbProcSize
,
(
UINT
)
fpo
[
i
].
cdwLocals
,
fpo
[
i
].
cdwParams
,
fpo
[
i
].
cbProlog
,
fpo
[
i
].
cbRegs
,
frame_type
[
fpo
[
i
].
cbFrame
],
fpo
[
i
].
fHasSEH
?
'Y'
:
'N'
,
fpo
[
i
].
fUseBP
?
'Y'
:
'N'
);
}
...
...
tools/winedump/pe.c
View file @
fdd0ad59
...
...
@@ -231,8 +231,8 @@ static inline void print_datadirectory(DWORD n, const IMAGE_DATA_DIRECTORY *dire
for
(
i
=
0
;
i
<
n
&&
i
<
16
;
i
++
)
{
printf
(
" %-12s rva: 0x%-8x size: 0x%-8x
\n
"
,
DirectoryNames
[
i
],
directory
[
i
].
VirtualAddress
,
directory
[
i
].
Size
);
DirectoryNames
[
i
],
(
UINT
)
directory
[
i
].
VirtualAddress
,
(
UINT
)
directory
[
i
].
Size
);
}
}
...
...
@@ -350,12 +350,12 @@ void dump_file_header(const IMAGE_FILE_HEADER *fileHeader)
fileHeader
->
Machine
,
get_machine_str
(
fileHeader
->
Machine
));
printf
(
" Number of Sections: %d
\n
"
,
fileHeader
->
NumberOfSections
);
printf
(
" TimeDateStamp: %08X (%s) offset %lu
\n
"
,
fileHeader
->
TimeDateStamp
,
get_time_str
(
fileHeader
->
TimeDateStamp
),
(
UINT
)
fileHeader
->
TimeDateStamp
,
get_time_str
(
fileHeader
->
TimeDateStamp
),
Offset
(
&
(
fileHeader
->
TimeDateStamp
)));
printf
(
" PointerToSymbolTable: %08X
\n
"
,
fileHeader
->
PointerToSymbolTable
);
printf
(
" NumberOfSymbols: %08X
\n
"
,
fileHeader
->
NumberOfSymbols
);
printf
(
" SizeOfOptionalHeader: %04X
\n
"
,
fileHeader
->
SizeOfOptionalHeader
);
printf
(
" Characteristics: %04X
\n
"
,
fileHeader
->
Characteristics
);
printf
(
" PointerToSymbolTable: %08X
\n
"
,
(
UINT
)
fileHeader
->
PointerToSymbolTable
);
printf
(
" NumberOfSymbols: %08X
\n
"
,
(
UINT
)
fileHeader
->
NumberOfSymbols
);
printf
(
" SizeOfOptionalHeader: %04X
\n
"
,
(
UINT
)
fileHeader
->
SizeOfOptionalHeader
);
printf
(
" Characteristics: %04X
\n
"
,
(
UINT
)
fileHeader
->
Characteristics
);
#define X(f,s) if (fileHeader->Characteristics & f) printf(" %s\n", s)
X
(
IMAGE_FILE_RELOCS_STRIPPED
,
"RELOCS_STRIPPED"
);
X
(
IMAGE_FILE_EXECUTABLE_IMAGE
,
"EXECUTABLE_IMAGE"
);
...
...
@@ -394,14 +394,14 @@ void dump_section(const IMAGE_SECTION_HEADER *sectHead, const char* strtable)
else
printf
(
" %-8.8s"
,
sectHead
->
Name
);
printf
(
" VirtSize: 0x%08x VirtAddr: 0x%08x
\n
"
,
sectHead
->
Misc
.
VirtualSize
,
sectHead
->
VirtualAddress
);
(
UINT
)
sectHead
->
Misc
.
VirtualSize
,
(
UINT
)
sectHead
->
VirtualAddress
);
printf
(
" raw data offs: 0x%08x raw data size: 0x%08x
\n
"
,
sectHead
->
PointerToRawData
,
sectHead
->
SizeOfRawData
);
(
UINT
)
sectHead
->
PointerToRawData
,
(
UINT
)
sectHead
->
SizeOfRawData
);
printf
(
" relocation offs: 0x%08x relocations: 0x%08x
\n
"
,
sectHead
->
PointerToRelocations
,
sectHead
->
NumberOfRelocations
);
(
UINT
)
sectHead
->
PointerToRelocations
,
(
UINT
)
sectHead
->
NumberOfRelocations
);
printf
(
" line # offs: %-8u line #'s: %-8u
\n
"
,
sectHead
->
PointerToLinenumbers
,
sectHead
->
NumberOfLinenumbers
);
printf
(
" characteristics: 0x%08x
\n
"
,
sectHead
->
Characteristics
);
(
UINT
)
sectHead
->
PointerToLinenumbers
,
(
UINT
)
sectHead
->
NumberOfLinenumbers
);
printf
(
" characteristics: 0x%08x
\n
"
,
(
UINT
)
sectHead
->
Characteristics
);
printf
(
" "
);
#define X(b,s) if (sectHead->Characteristics & b) printf(" " s)
/* #define IMAGE_SCN_TYPE_REG 0x00000000 - Reserved */
...
...
@@ -610,16 +610,16 @@ static void dump_dir_exported_functions(void)
printf
(
"Exports table:
\n
"
);
printf
(
"
\n
"
);
printf
(
" Name: %s
\n
"
,
(
const
char
*
)
RVA
(
exportDir
->
Name
,
sizeof
(
DWORD
)));
printf
(
" Characteristics: %08x
\n
"
,
exportDir
->
Characteristics
);
printf
(
" Characteristics: %08x
\n
"
,
(
UINT
)
exportDir
->
Characteristics
);
printf
(
" TimeDateStamp: %08X %s
\n
"
,
exportDir
->
TimeDateStamp
,
get_time_str
(
exportDir
->
TimeDateStamp
));
(
UINT
)
exportDir
->
TimeDateStamp
,
get_time_str
(
exportDir
->
TimeDateStamp
));
printf
(
" Version: %u.%02u
\n
"
,
exportDir
->
MajorVersion
,
exportDir
->
MinorVersion
);
printf
(
" Ordinal base: %u
\n
"
,
exportDir
->
Base
);
printf
(
" # of functions: %u
\n
"
,
exportDir
->
NumberOfFunctions
);
printf
(
" # of Names: %u
\n
"
,
exportDir
->
NumberOfNames
);
printf
(
"Addresses of functions: %08X
\n
"
,
exportDir
->
AddressOfFunctions
);
printf
(
"Addresses of name ordinals: %08X
\n
"
,
exportDir
->
AddressOfNameOrdinals
);
printf
(
"Addresses of names: %08X
\n
"
,
exportDir
->
AddressOfNames
);
printf
(
" Ordinal base: %u
\n
"
,
(
UINT
)
exportDir
->
Base
);
printf
(
" # of functions: %u
\n
"
,
(
UINT
)
exportDir
->
NumberOfFunctions
);
printf
(
" # of Names: %u
\n
"
,
(
UINT
)
exportDir
->
NumberOfNames
);
printf
(
"Addresses of functions: %08X
\n
"
,
(
UINT
)
exportDir
->
AddressOfFunctions
);
printf
(
"Addresses of name ordinals: %08X
\n
"
,
(
UINT
)
exportDir
->
AddressOfNameOrdinals
);
printf
(
"Addresses of names: %08X
\n
"
,
(
UINT
)
exportDir
->
AddressOfNames
);
printf
(
"
\n
"
);
printf
(
" Entry Pt Ordn Name
\n
"
);
...
...
@@ -636,7 +636,7 @@ static void dump_dir_exported_functions(void)
for
(
i
=
0
;
i
<
exportDir
->
NumberOfFunctions
;
i
++
)
{
if
(
!
pFunc
[
i
])
continue
;
printf
(
" %08X %5u "
,
pFunc
[
i
],
exportDir
->
Base
+
i
);
printf
(
" %08X %5u "
,
pFunc
[
i
],
(
UINT
)
exportDir
->
Base
+
i
);
if
(
funcs
[
i
])
printf
(
"%s"
,
get_symbol_str
((
const
char
*
)
RVA
(
funcs
[
i
],
sizeof
(
DWORD
))));
else
...
...
@@ -1665,7 +1665,7 @@ static void dump_image_thunk_data32(const IMAGE_THUNK_DATA32 *il, int offset, UI
for
(;
il
->
u1
.
Ordinal
;
il
++
,
thunk_rva
+=
sizeof
(
UINT
))
{
if
(
IMAGE_SNAP_BY_ORDINAL32
(
il
->
u1
.
Ordinal
))
printf
(
" %08x %4u <by ordinal>
\n
"
,
thunk_rva
,
IMAGE_ORDINAL32
(
il
->
u1
.
Ordinal
));
printf
(
" %08x %4u <by ordinal>
\n
"
,
thunk_rva
,
(
UINT
)
IMAGE_ORDINAL32
(
il
->
u1
.
Ordinal
));
else
{
iibn
=
RVA
((
DWORD
)
il
->
u1
.
AddressOfData
-
offset
,
sizeof
(
DWORD
));
...
...
@@ -1695,8 +1695,8 @@ static void dump_dir_imported_functions(void)
printf
(
" offset %08lx %s
\n
"
,
Offset
(
importDesc
),
(
const
char
*
)
RVA
(
importDesc
->
Name
,
sizeof
(
DWORD
)));
printf
(
" Hint/Name Table: %08X
\n
"
,
(
UINT
)
importDesc
->
u
.
OriginalFirstThunk
);
printf
(
" TimeDateStamp: %08X (%s)
\n
"
,
importDesc
->
TimeDateStamp
,
get_time_str
(
importDesc
->
TimeDateStamp
));
printf
(
" ForwarderChain: %08X
\n
"
,
importDesc
->
ForwarderChain
);
(
UINT
)
importDesc
->
TimeDateStamp
,
get_time_str
(
importDesc
->
TimeDateStamp
));
printf
(
" ForwarderChain: %08X
\n
"
,
(
UINT
)
importDesc
->
ForwarderChain
);
printf
(
" First thunk RVA: %08X
\n
"
,
(
UINT
)
importDesc
->
FirstThunk
);
printf
(
" Thunk Ordn Name
\n
"
);
...
...
@@ -1782,12 +1782,12 @@ static void dump_dir_delay_imported_functions(void)
if
(
!
importDesc
->
DllNameRVA
||
!
importDesc
->
ImportAddressTableRVA
||
!
importDesc
->
ImportNameTableRVA
)
break
;
printf
(
" grAttrs %08x offset %08lx %s
\n
"
,
importDesc
->
Attributes
.
AllAttributes
,
Offset
(
importDesc
)
,
(
const
char
*
)
RVA
(
importDesc
->
DllNameRVA
-
offset
,
sizeof
(
DWORD
)));
printf
(
" Hint/Name Table: %08x
\n
"
,
importDesc
->
ImportNameTableRVA
);
printf
(
" Address Table: %08x
\n
"
,
importDesc
->
ImportAddressTableRVA
);
printf
(
" grAttrs %08x offset %08lx %s
\n
"
,
(
UINT
)
importDesc
->
Attributes
.
AllAttributes
,
Offset
(
importDesc
),
(
const
char
*
)
RVA
(
importDesc
->
DllNameRVA
-
offset
,
sizeof
(
DWORD
)));
printf
(
" Hint/Name Table: %08x
\n
"
,
(
UINT
)
importDesc
->
ImportNameTableRVA
);
printf
(
" Address Table: %08x
\n
"
,
(
UINT
)
importDesc
->
ImportAddressTableRVA
);
printf
(
" TimeDateStamp: %08X (%s)
\n
"
,
importDesc
->
TimeDateStamp
,
get_time_str
(
importDesc
->
TimeDateStamp
));
(
UINT
)
importDesc
->
TimeDateStamp
,
get_time_str
(
importDesc
->
TimeDateStamp
));
printf
(
" Thunk Ordn Name
\n
"
);
...
...
@@ -1813,9 +1813,9 @@ static void dump_dir_debug_dir(const IMAGE_DEBUG_DIRECTORY* idd, int idx)
const
char
*
str
;
printf
(
"Directory %02u
\n
"
,
idx
+
1
);
printf
(
" Characteristics: %08X
\n
"
,
idd
->
Characteristics
);
printf
(
" Characteristics: %08X
\n
"
,
(
UINT
)
idd
->
Characteristics
);
printf
(
" TimeDateStamp: %08X %s
\n
"
,
idd
->
TimeDateStamp
,
get_time_str
(
idd
->
TimeDateStamp
));
(
UINT
)
idd
->
TimeDateStamp
,
get_time_str
(
idd
->
TimeDateStamp
));
printf
(
" Version %u.%02u
\n
"
,
idd
->
MajorVersion
,
idd
->
MinorVersion
);
switch
(
idd
->
Type
)
{
...
...
@@ -1838,10 +1838,10 @@ static void dump_dir_debug_dir(const IMAGE_DEBUG_DIRECTORY* idd, int idx)
case
IMAGE_DEBUG_TYPE_MPX
:
str
=
"MPX"
;
break
;
case
IMAGE_DEBUG_TYPE_REPRO
:
str
=
"REPRO"
;
break
;
}
printf
(
" Type: %u (%s)
\n
"
,
idd
->
Type
,
str
);
printf
(
" SizeOfData: %u
\n
"
,
idd
->
SizeOfData
);
printf
(
" AddressOfRawData: %08X
\n
"
,
idd
->
AddressOfRawData
);
printf
(
" PointerToRawData: %08X
\n
"
,
idd
->
PointerToRawData
);
printf
(
" Type: %u (%s)
\n
"
,
(
UINT
)
idd
->
Type
,
str
);
printf
(
" SizeOfData: %u
\n
"
,
(
UINT
)
idd
->
SizeOfData
);
printf
(
" AddressOfRawData: %08X
\n
"
,
(
UINT
)
idd
->
AddressOfRawData
);
printf
(
" PointerToRawData: %08X
\n
"
,
(
UINT
)
idd
->
PointerToRawData
);
switch
(
idd
->
Type
)
{
...
...
@@ -1862,9 +1862,8 @@ static void dump_dir_debug_dir(const IMAGE_DEBUG_DIRECTORY* idd, int idx)
const
IMAGE_DEBUG_MISC
*
misc
=
PRD
(
idd
->
PointerToRawData
,
idd
->
SizeOfData
);
if
(
!
misc
)
{
printf
(
"Can't get misc debug information
\n
"
);
break
;}
printf
(
" DataType: %u (%s)
\n
"
,
misc
->
DataType
,
(
misc
->
DataType
==
IMAGE_DEBUG_MISC_EXENAME
)
?
"Exe name"
:
"Unknown"
);
printf
(
" Length: %u
\n
"
,
misc
->
Length
);
(
UINT
)
misc
->
DataType
,
(
misc
->
DataType
==
IMAGE_DEBUG_MISC_EXENAME
)
?
"Exe name"
:
"Unknown"
);
printf
(
" Length: %u
\n
"
,
(
UINT
)
misc
->
Length
);
printf
(
" Unicode: %s
\n
"
,
misc
->
Unicode
?
"Yes"
:
"No"
);
printf
(
" Data: %s
\n
"
,
misc
->
Data
);
}
...
...
@@ -1906,7 +1905,7 @@ static inline void print_clrflags(const char *title, UINT value)
static
inline
void
print_clrdirectory
(
const
char
*
title
,
const
IMAGE_DATA_DIRECTORY
*
dir
)
{
printf
(
" %-23s rva: 0x%-8x size: 0x%-8x
\n
"
,
title
,
dir
->
VirtualAddress
,
dir
->
Size
);
printf
(
" %-23s rva: 0x%-8x size: 0x%-8x
\n
"
,
title
,
(
UINT
)
dir
->
VirtualAddress
,
(
UINT
)
dir
->
Size
);
}
static
void
dump_dir_clr_header
(
void
)
...
...
@@ -1964,7 +1963,7 @@ static void dump_dir_reloc(void)
printf
(
"Relocations
\n
"
);
while
(
rel
<
end
-
1
&&
rel
->
SizeOfBlock
)
{
printf
(
" Page %x
\n
"
,
rel
->
VirtualAddress
);
printf
(
" Page %x
\n
"
,
(
UINT
)
rel
->
VirtualAddress
);
relocs
=
(
const
USHORT
*
)(
rel
+
1
);
i
=
(
rel
->
SizeOfBlock
-
sizeof
(
*
rel
))
/
sizeof
(
USHORT
);
while
(
i
--
)
...
...
@@ -2048,13 +2047,13 @@ void dbg_dump(void)
separateDebugHead
->
Machine
,
get_machine_str
(
separateDebugHead
->
Machine
));
printf
(
"Characteristics: 0x%04X
\n
"
,
separateDebugHead
->
Characteristics
);
printf
(
"TimeDateStamp: 0x%08X (%s)
\n
"
,
separateDebugHead
->
TimeDateStamp
,
get_time_str
(
separateDebugHead
->
TimeDateStamp
));
printf
(
"CheckSum: 0x%08X
\n
"
,
separateDebugHead
->
CheckSum
);
printf
(
"ImageBase: 0x%08X
\n
"
,
separateDebugHead
->
ImageBase
);
printf
(
"SizeOfImage: 0x%08X
\n
"
,
separateDebugHead
->
SizeOfImage
);
printf
(
"NumberOfSections: 0x%08X
\n
"
,
separateDebugHead
->
NumberOfSections
);
printf
(
"ExportedNamesSize: 0x%08X
\n
"
,
separateDebugHead
->
ExportedNamesSize
);
printf
(
"DebugDirectorySize: 0x%08X
\n
"
,
separateDebugHead
->
DebugDirectorySize
);
(
UINT
)
separateDebugHead
->
TimeDateStamp
,
get_time_str
(
separateDebugHead
->
TimeDateStamp
));
printf
(
"CheckSum: 0x%08X
\n
"
,
(
UINT
)
separateDebugHead
->
CheckSum
);
printf
(
"ImageBase: 0x%08X
\n
"
,
(
UINT
)
separateDebugHead
->
ImageBase
);
printf
(
"SizeOfImage: 0x%08X
\n
"
,
(
UINT
)
separateDebugHead
->
SizeOfImage
);
printf
(
"NumberOfSections: 0x%08X
\n
"
,
(
UINT
)
separateDebugHead
->
NumberOfSections
);
printf
(
"ExportedNamesSize: 0x%08X
\n
"
,
(
UINT
)
separateDebugHead
->
ExportedNamesSize
);
printf
(
"DebugDirectorySize: 0x%08X
\n
"
,
(
UINT
)
separateDebugHead
->
DebugDirectorySize
);
if
(
!
PRD
(
sizeof
(
IMAGE_SEPARATE_DEBUG_HEADER
),
separateDebugHead
->
NumberOfSections
*
sizeof
(
IMAGE_SECTION_HEADER
)))
...
...
@@ -2528,7 +2527,7 @@ static void do_grab_sym( void )
/* Ordinal only entry */
sprintf
(
ordinal_text
,
"%s_%u"
,
globals
.
forward_dll
?
globals
.
forward_dll
:
OUTPUT_UC_DLL_NAME
,
exportDir
->
Base
+
i
);
(
UINT
)
exportDir
->
Base
+
i
);
str_toupper
(
ordinal_text
);
dll_symbols
[
j
].
symbol
=
xstrdup
(
ordinal_text
);
assert
(
dll_symbols
[
j
].
symbol
);
...
...
@@ -2541,7 +2540,8 @@ static void do_grab_sym( void )
if
(
NORMAL
)
printf
(
"%u named symbols in DLL, %u total, %d unique (ordinal base = %d)
\n
"
,
exportDir
->
NumberOfNames
,
exportDir
->
NumberOfFunctions
,
j
,
exportDir
->
Base
);
(
UINT
)
exportDir
->
NumberOfNames
,
(
UINT
)
exportDir
->
NumberOfFunctions
,
j
,
(
UINT
)
exportDir
->
Base
);
qsort
(
dll_symbols
,
j
,
sizeof
(
dll_symbol
),
symbol_cmp
);
...
...
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