dbghelp: Attach a struct cpu* to every module.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2021-11-08 14:57:46 +01:00 committed by Alexandre Julliard
parent e105e9d35e
commit d72e6ac772
2 changed files with 6 additions and 0 deletions

View file

@ -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;

View file

@ -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);