mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 20:07:17 +00:00
winedump: Support a couple of 'section' options (minidump).
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
2253504aa5
commit
b89102173e
|
@ -228,7 +228,9 @@ static const struct my_option option_table[] = {
|
|||
" for NE: export, resource\n"
|
||||
" for PE: import, export, debug, resource, tls, loadcfg, clr, reloc, dynreloc, except, apiset\n"
|
||||
" for PDB: PDB, TPI, DBI, IPI, public, image\n"
|
||||
" and suboptions: hash (PDB, TPI, TPI, DBI, public) and line (DBI)"},
|
||||
" and suboptions: hash (PDB, TPI, TPI, DBI, public) and line (DBI)\n"
|
||||
" for minidump: exception, handle, info, memory, module, thread\n"
|
||||
" and suboptions: content (memory, module, thread)\n"},
|
||||
{"-t", DUMP, 0, do_symtable, "-t Dump symbol table"},
|
||||
{"-x", DUMP, 0, do_dumpall, "-x Dump everything"},
|
||||
{"sym", DMGL, 0, do_demangle, "sym <sym> Demangle C++ symbol <sym> and exit"},
|
||||
|
|
|
@ -85,6 +85,7 @@ void mdmp_dump(void)
|
|||
switch (dir->StreamType)
|
||||
{
|
||||
case ThreadListStream:
|
||||
if (globals_dump_sect("thread"))
|
||||
{
|
||||
const MINIDUMP_THREAD_LIST *mtl = stream;
|
||||
const MINIDUMP_THREAD *mt = mtl->Threads;
|
||||
|
@ -99,6 +100,7 @@ void mdmp_dump(void)
|
|||
printf(" Priority: %u\n", mt->Priority);
|
||||
printf(" Teb: %s\n", get_hexint64_str(mt->Teb));
|
||||
printf(" Stack: %s +%#x\n", get_hexint64_str(mt->Stack.StartOfMemoryRange), mt->Stack.Memory.DataSize);
|
||||
if (globals_dump_sect("content"))
|
||||
dump_mdmp_data(&mt->Stack.Memory, " ");
|
||||
printf(" ThreadContext:\n");
|
||||
dump_mdmp_data(&mt->ThreadContext, " ");
|
||||
|
@ -107,6 +109,7 @@ void mdmp_dump(void)
|
|||
break;
|
||||
case ModuleListStream:
|
||||
case 0xFFF0:
|
||||
if (globals_dump_sect("module"))
|
||||
{
|
||||
const MINIDUMP_MODULE_LIST *mml = stream;
|
||||
const MINIDUMP_MODULE* mm = mml->Modules;
|
||||
|
@ -184,8 +187,10 @@ void mdmp_dump(void)
|
|||
printf(" dwFileDate: %x%08x\n",
|
||||
(UINT)mm->VersionInfo.dwFileDateMS, (UINT)mm->VersionInfo.dwFileDateLS);
|
||||
printf(" CvRecord: <%u>\n", (UINT)mm->CvRecord.DataSize);
|
||||
if (globals_dump_sect("content"))
|
||||
dump_mdmp_data(&mm->CvRecord, " ");
|
||||
printf(" MiscRecord: <%u>\n", (UINT)mm->MiscRecord.DataSize);
|
||||
if (globals_dump_sect("content"))
|
||||
dump_mdmp_data(&mm->MiscRecord, " ");
|
||||
printf(" Reserved0: %s\n", get_hexint64_str(mm->Reserved0));
|
||||
printf(" Reserved1: %s\n", get_hexint64_str(mm->Reserved1));
|
||||
|
@ -193,6 +198,7 @@ void mdmp_dump(void)
|
|||
}
|
||||
break;
|
||||
case MemoryListStream:
|
||||
if (globals_dump_sect("memory"))
|
||||
{
|
||||
const MINIDUMP_MEMORY_LIST *mml = stream;
|
||||
const MINIDUMP_MEMORY_DESCRIPTOR* mmd = mml->MemoryRanges;
|
||||
|
@ -201,12 +207,15 @@ void mdmp_dump(void)
|
|||
for (i = 0; i < mml->NumberOfMemoryRanges; i++, mmd++)
|
||||
{
|
||||
printf(" Memory Range #%d:\n", i);
|
||||
dump_mdmp_data(&mmd->Memory, " ");
|
||||
printf(" Range: %s +%#x\n", get_hexint64_str(mmd->StartOfMemoryRange), mmd->Memory.DataSize);
|
||||
if (globals_dump_sect("content"))
|
||||
dump_mdmp_data(&mmd->Memory, " ");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SystemInfoStream:
|
||||
if (globals_dump_sect("info"))
|
||||
{
|
||||
const MINIDUMP_SYSTEM_INFO *msi = stream;
|
||||
const char* str;
|
||||
|
@ -369,6 +378,7 @@ void mdmp_dump(void)
|
|||
}
|
||||
break;
|
||||
case MiscInfoStream:
|
||||
if (globals_dump_sect("info"))
|
||||
{
|
||||
const MINIDUMP_MISC_INFO *mmi = stream;
|
||||
|
||||
|
@ -386,6 +396,7 @@ void mdmp_dump(void)
|
|||
}
|
||||
break;
|
||||
case ExceptionStream:
|
||||
if (globals_dump_sect("exception"))
|
||||
{
|
||||
const MINIDUMP_EXCEPTION_STREAM *mes = stream;
|
||||
|
||||
|
@ -406,6 +417,7 @@ void mdmp_dump(void)
|
|||
}
|
||||
break;
|
||||
case HandleDataStream:
|
||||
if (globals_dump_sect("handle"))
|
||||
{
|
||||
const MINIDUMP_HANDLE_DATA_STREAM *mhd = stream;
|
||||
|
||||
|
@ -439,6 +451,7 @@ void mdmp_dump(void)
|
|||
}
|
||||
break;
|
||||
case ThreadInfoListStream:
|
||||
if (globals_dump_sect("thread"))
|
||||
{
|
||||
const MINIDUMP_THREAD_INFO_LIST *til = stream;
|
||||
|
||||
|
@ -468,8 +481,8 @@ void mdmp_dump(void)
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case UnloadedModuleListStream:
|
||||
if (globals_dump_sect("module"))
|
||||
{
|
||||
const MINIDUMP_UNLOADED_MODULE_LIST *uml = stream;
|
||||
|
||||
|
@ -494,11 +507,11 @@ void mdmp_dump(void)
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("NIY %d\n", dir->StreamType);
|
||||
printf(" RVA: %u\n", (UINT)dir->Location.Rva);
|
||||
printf(" Size: %u\n", dir->Location.DataSize);
|
||||
if (globals_dump_sect("content"))
|
||||
dump_mdmp_data(&dir->Location, " ");
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue