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
f2ee6b7c
Commit
f2ee6b7c
authored
May 19, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Add support for dumping UnloadedModuleListStream.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4a1f1082
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
8 deletions
+51
-8
minidumpapiset.h
include/minidumpapiset.h
+16
-0
minidump.c
tools/winedump/minidump.c
+35
-8
No files found.
include/minidumpapiset.h
View file @
f2ee6b7c
...
@@ -426,6 +426,22 @@ typedef struct _MINIDUMP_THREAD_INFO_LIST
...
@@ -426,6 +426,22 @@ typedef struct _MINIDUMP_THREAD_INFO_LIST
ULONG
NumberOfEntries
;
ULONG
NumberOfEntries
;
}
MINIDUMP_THREAD_INFO_LIST
,
*
PMINIDUMP_THREAD_INFO_LIST
;
}
MINIDUMP_THREAD_INFO_LIST
,
*
PMINIDUMP_THREAD_INFO_LIST
;
typedef
struct
_MINIDUMP_UNLOADED_MODULE
{
ULONG64
BaseOfImage
;
ULONG32
SizeOfImage
;
ULONG32
CheckSum
;
ULONG32
TimeDateStamp
;
RVA
ModuleNameRva
;
}
MINIDUMP_UNLOADED_MODULE
,
*
PMINIDUMP_UNLOADED_MODULE
;
typedef
struct
_MINIDUMP_UNLOADED_MODULE_LIST
{
ULONG32
SizeOfHeader
;
ULONG32
SizeOfEntry
;
ULONG32
NumberOfEntries
;
}
MINIDUMP_UNLOADED_MODULE_LIST
,
*
PMINIDUMP_UNLOADED_MODULE_LIST
;
typedef
enum
_MINIDUMP_STREAM_TYPE
typedef
enum
_MINIDUMP_STREAM_TYPE
{
{
UnusedStream
=
0
,
UnusedStream
=
0
,
...
...
tools/winedump/minidump.c
View file @
f2ee6b7c
...
@@ -83,6 +83,7 @@ void mdmp_dump(void)
...
@@ -83,6 +83,7 @@ void mdmp_dump(void)
const
MINIDUMP_DIRECTORY
*
dir
;
const
MINIDUMP_DIRECTORY
*
dir
;
const
void
*
stream
;
const
void
*
stream
;
unsigned
int
i
,
idx
;
unsigned
int
i
,
idx
;
const
BYTE
*
ptr
;
if
(
!
hdr
)
if
(
!
hdr
)
{
{
...
@@ -439,17 +440,16 @@ void mdmp_dump(void)
...
@@ -439,17 +440,16 @@ void mdmp_dump(void)
case
HandleDataStream
:
case
HandleDataStream
:
{
{
const
MINIDUMP_HANDLE_DATA_STREAM
*
mhd
=
stream
;
const
MINIDUMP_HANDLE_DATA_STREAM
*
mhd
=
stream
;
const
BYTE
*
desc
;
printf
(
"Handle data:
\n
"
);
printf
(
"Handle data:
\n
"
);
printf
(
" SizeOfHeader: %u
\n
"
,
mhd
->
SizeOfHeader
);
printf
(
" SizeOfHeader: %u
\n
"
,
mhd
->
SizeOfHeader
);
printf
(
" SizeOfDescriptor: %u
\n
"
,
mhd
->
SizeOfDescriptor
);
printf
(
" SizeOfDescriptor: %u
\n
"
,
mhd
->
SizeOfDescriptor
);
printf
(
" NumberOfDescriptors: %u
\n
"
,
mhd
->
NumberOfDescriptors
);
printf
(
" NumberOfDescriptors: %u
\n
"
,
mhd
->
NumberOfDescriptors
);
desc
=
(
BYTE
*
)
mhd
+
sizeof
(
*
mhd
);
ptr
=
(
BYTE
*
)
mhd
+
sizeof
(
*
mhd
);
for
(
i
=
0
;
i
<
mhd
->
NumberOfDescriptors
;
++
i
)
for
(
i
=
0
;
i
<
mhd
->
NumberOfDescriptors
;
++
i
)
{
{
const
MINIDUMP_HANDLE_DESCRIPTOR_2
*
hd
=
(
void
*
)
desc
;
const
MINIDUMP_HANDLE_DESCRIPTOR_2
*
hd
=
(
void
*
)
ptr
;
printf
(
" Handle [%u]:
\n
"
,
i
);
printf
(
" Handle [%u]:
\n
"
,
i
);
print_longlong
(
" Handle"
,
hd
->
Handle
);
print_longlong
(
" Handle"
,
hd
->
Handle
);
...
@@ -472,24 +472,23 @@ void mdmp_dump(void)
...
@@ -472,24 +472,23 @@ void mdmp_dump(void)
printf
(
" Reserved0: %#x
\n
"
,
hd
->
Reserved0
);
printf
(
" Reserved0: %#x
\n
"
,
hd
->
Reserved0
);
}
}
desc
+=
mhd
->
SizeOfDescriptor
;
ptr
+=
mhd
->
SizeOfDescriptor
;
}
}
}
}
break
;
break
;
case
ThreadInfoListStream
:
case
ThreadInfoListStream
:
{
{
const
MINIDUMP_THREAD_INFO_LIST
*
til
=
stream
;
const
MINIDUMP_THREAD_INFO_LIST
*
til
=
stream
;
const
BYTE
*
desc
;
printf
(
"Thread Info List:
\n
"
);
printf
(
"Thread Info List:
\n
"
);
printf
(
" SizeOfHeader: %u
\n
"
,
(
UINT
)
til
->
SizeOfHeader
);
printf
(
" SizeOfHeader: %u
\n
"
,
(
UINT
)
til
->
SizeOfHeader
);
printf
(
" SizeOfEntry: %u
\n
"
,
(
UINT
)
til
->
SizeOfEntry
);
printf
(
" SizeOfEntry: %u
\n
"
,
(
UINT
)
til
->
SizeOfEntry
);
printf
(
" NumberOfEntries: %u
\n
"
,
(
UINT
)
til
->
NumberOfEntries
);
printf
(
" NumberOfEntries: %u
\n
"
,
(
UINT
)
til
->
NumberOfEntries
);
desc
=
(
BYTE
*
)
til
+
sizeof
(
*
til
);
ptr
=
(
BYTE
*
)
til
+
sizeof
(
*
til
);
for
(
i
=
0
;
i
<
til
->
NumberOfEntries
;
++
i
)
for
(
i
=
0
;
i
<
til
->
NumberOfEntries
;
++
i
)
{
{
const
MINIDUMP_THREAD_INFO
*
ti
=
(
void
*
)
desc
;
const
MINIDUMP_THREAD_INFO
*
ti
=
(
void
*
)
ptr
;
printf
(
" Thread [%u]:
\n
"
,
i
);
printf
(
" Thread [%u]:
\n
"
,
i
);
printf
(
" ThreadId: %u
\n
"
,
ti
->
ThreadId
);
printf
(
" ThreadId: %u
\n
"
,
ti
->
ThreadId
);
...
@@ -503,7 +502,35 @@ void mdmp_dump(void)
...
@@ -503,7 +502,35 @@ void mdmp_dump(void)
print_longlong
(
" StartAddress"
,
ti
->
StartAddress
);
print_longlong
(
" StartAddress"
,
ti
->
StartAddress
);
print_longlong
(
" Affinity"
,
ti
->
Affinity
);
print_longlong
(
" Affinity"
,
ti
->
Affinity
);
desc
+=
til
->
SizeOfEntry
;
ptr
+=
til
->
SizeOfEntry
;
}
}
break
;
case
UnloadedModuleListStream
:
{
const
MINIDUMP_UNLOADED_MODULE_LIST
*
uml
=
stream
;
printf
(
"Unloaded module list:
\n
"
);
printf
(
" SizeOfHeader: %u
\n
"
,
uml
->
SizeOfHeader
);
printf
(
" SizeOfEntry: %u
\n
"
,
uml
->
SizeOfEntry
);
printf
(
" NumberOfEntries: %u
\n
"
,
uml
->
NumberOfEntries
);
ptr
=
(
BYTE
*
)
uml
+
sizeof
(
*
uml
);
for
(
i
=
0
;
i
<
uml
->
NumberOfEntries
;
++
i
)
{
const
MINIDUMP_UNLOADED_MODULE
*
mod
=
(
void
*
)
ptr
;
printf
(
" Module [%u]:
\n
"
,
i
);
print_longlong
(
" BaseOfImage"
,
mod
->
BaseOfImage
);
printf
(
" SizeOfImage: %u
\n
"
,
mod
->
SizeOfImage
);
printf
(
" CheckSum: %#x
\n
"
,
mod
->
CheckSum
);
printf
(
" TimeDateStamp: %s
\n
"
,
get_time_str
(
mod
->
TimeDateStamp
));
printf
(
" ModuleName: "
);
dump_mdmp_string
(
mod
->
ModuleNameRva
);
printf
(
"
\n
"
);
ptr
+=
uml
->
SizeOfEntry
;
}
}
}
}
break
;
break
;
...
...
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