Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dbghelp/dbghelp_private.h | 3 +++ dlls/dbghelp/module.c | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 61173b34b5a..1e77ed49225 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -430,6 +430,8 @@ struct module_format } u; };
+struct cpu; + struct module { struct process* process; @@ -438,6 +440,7 @@ struct module struct module* next; enum module_type type : 16; unsigned short is_virtual : 1; + struct cpu* cpu; DWORD64 reloc_delta; WCHAR* real_path;
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 8168e727c52..65bdbb38fda 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -230,6 +230,9 @@ struct module* module_new(struct process* pcs, const WCHAR* name, module->addr_sorttab = NULL; module->num_sorttab = 0; module->num_symbols = 0; + module->cpu = cpu_find(machine); + if (!module->cpu) + module->cpu = dbghelp_current_cpu;
vector_init(&module->vsymt, sizeof(struct symt*), 128); vector_init(&module->vcustom_symt, sizeof(struct symt*), 16);