Commit d50f7b02 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

winedump: Add support for ThreadInfoListStream stream.

parent 0d89f67e
......@@ -405,6 +405,27 @@ typedef struct _MINIDUMP_HANDLE_DESCRIPTOR_2
ULONG32 Reserved0;
} MINIDUMP_HANDLE_DESCRIPTOR_2, *PMINIDUMP_HANDLE_DESCRIPTOR_2;
typedef struct _MINIDUMP_THREAD_INFO
{
ULONG32 ThreadId;
ULONG32 DumpFlags;
ULONG32 DumpError;
ULONG32 ExitStatus;
ULONG64 CreateTime;
ULONG64 ExitTime;
ULONG64 KernelTime;
ULONG64 UserTime;
ULONG64 StartAddress;
ULONG64 Affinity;
} MINIDUMP_THREAD_INFO, *PMINIDUMP_THREAD_INFO;
typedef struct _MINIDUMP_THREAD_INFO_LIST
{
ULONG SizeOfHeader;
ULONG SizeOfEntry;
ULONG NumberOfEntries;
} MINIDUMP_THREAD_INFO_LIST, *PMINIDUMP_THREAD_INFO_LIST;
typedef enum _MINIDUMP_STREAM_TYPE
{
UnusedStream = 0,
......
......@@ -476,6 +476,37 @@ void mdmp_dump(void)
}
}
break;
case ThreadInfoListStream:
{
const MINIDUMP_THREAD_INFO_LIST *til = stream;
const BYTE *desc;
printf("Thread Info List:\n");
printf(" SizeOfHeader: %u\n", (UINT)til->SizeOfHeader);
printf(" SizeOfEntry: %u\n", (UINT)til->SizeOfEntry);
printf(" NumberOfEntries: %u\n", (UINT)til->NumberOfEntries);
desc = (BYTE *)til + sizeof(*til);
for (i = 0; i < til->NumberOfEntries; ++i)
{
const MINIDUMP_THREAD_INFO *ti = (void *)desc;
printf(" Thread [%u]:\n", i);
printf(" ThreadId: %u\n", ti->ThreadId);
printf(" DumpFlags: %#x\n", ti->DumpFlags);
printf(" DumpError: %u\n", ti->DumpError);
printf(" ExitStatus: %u\n", ti->ExitStatus);
print_longlong(" CreateTime", ti->CreateTime);
print_longlong(" ExitTime", ti->ExitTime);
print_longlong(" KernelTime", ti->KernelTime);
print_longlong(" UserTime", ti->UserTime);
print_longlong(" StartAddress", ti->StartAddress);
print_longlong(" Affinity", ti->Affinity);
desc += til->SizeOfEntry;
}
}
break;
default:
printf("NIY %d\n", dir->StreamType);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment