From: Eric Pouech epouech@codeweavers.com
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 --- dlls/dbghelp/cpu_x86_64.c | 39 +---------------------------------- dlls/dbghelp/tests/minidump.c | 1 - 2 files changed, 1 insertion(+), 39 deletions(-)
diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c index a2be9fabbb7..a328d592d43 100644 --- a/dlls/dbghelp/cpu_x86_64.c +++ b/dlls/dbghelp/cpu_x86_64.c @@ -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 = { diff --git a/dlls/dbghelp/tests/minidump.c b/dlls/dbghelp/tests/minidump.c index 3e07911bae6..c6f73ca2662 100644 --- a/dlls/dbghelp/tests/minidump.c +++ b/dlls/dbghelp/tests/minidump.c @@ -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);