dbghelp: No longer embed unwind information in minidump (x86_64).
This can generate very long time when saving the minidump, but also when reloading it. Unwind information is expected to be gotten from an image matching the modules listed in the minidump for Normal mode. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55798 Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
6b9c1682b1
commit
819d8692c6
2 changed files with 1 additions and 39 deletions
|
@ -970,44 +970,7 @@ static BOOL x86_64_fetch_minidump_thread(struct dump_context* dc, unsigned index
|
|||
|
||||
static BOOL x86_64_fetch_minidump_module(struct dump_context* dc, unsigned index, unsigned flags)
|
||||
{
|
||||
/* FIXME: not sure about the flags... */
|
||||
if (1)
|
||||
{
|
||||
/* FIXME: crop values across module boundaries, */
|
||||
#ifdef __x86_64__
|
||||
struct process* pcs;
|
||||
struct module* module;
|
||||
const RUNTIME_FUNCTION* rtf;
|
||||
ULONG size;
|
||||
|
||||
if (!(pcs = process_find_by_handle(dc->process->handle)) ||
|
||||
!(module = module_find_by_addr(pcs, dc->modules[index].base)))
|
||||
return FALSE;
|
||||
rtf = (const RUNTIME_FUNCTION*)pe_map_directory(module, IMAGE_DIRECTORY_ENTRY_EXCEPTION, &size);
|
||||
if (rtf)
|
||||
{
|
||||
const RUNTIME_FUNCTION* end = (const RUNTIME_FUNCTION*)((const char*)rtf + size);
|
||||
UNWIND_INFO ui;
|
||||
|
||||
while (rtf + 1 < end)
|
||||
{
|
||||
while (rtf->UnwindData & 1) /* follow chained entry */
|
||||
{
|
||||
FIXME("RunTime_Function outside IMAGE_DIRECTORY_ENTRY_EXCEPTION unimplemented yet!\n");
|
||||
return FALSE;
|
||||
/* we need to read into the other process */
|
||||
/* rtf = (RUNTIME_FUNCTION*)(module->module.BaseOfImage + (rtf->UnwindData & ~1)); */
|
||||
}
|
||||
if (read_process_memory(dc->process, dc->modules[index].base + rtf->UnwindData, &ui, sizeof(ui)))
|
||||
minidump_add_memory_block(dc, dc->modules[index].base + rtf->UnwindData,
|
||||
FIELD_OFFSET(UNWIND_INFO, UnwindCode) + ui.CountOfCodes * sizeof(UNWIND_CODE), 0);
|
||||
rtf++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
struct cpu cpu_x86_64 = {
|
||||
|
|
|
@ -496,7 +496,6 @@ static void test_current_process(void)
|
|||
/* native embeds some elements in code segment from ntdll */
|
||||
ok(walker.num_text < 5, "unexpected code segments %u %u\n", walker.num_text, num_available_modules);
|
||||
|
||||
todo_wine_if(RtlImageNtHeader(GetModuleHandleW(NULL))->FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64)
|
||||
ok(walker.num_unwind_info == 0, "unexpected unwind info %u\n", walker.num_unwind_info);
|
||||
minidump_check_nostream(data, ExceptionStream);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue