From: Eric Pouech eric.pouech@gmail.com
SYMOPT_INCLUDE_32BIT_MODULES option applies when enumerating loaded modules, but not when actually loading debug information for a module.
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- dlls/dbghelp/pe_module.c | 5 ----- dlls/dbghelp/tests/dbghelp.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index 80c2f1a1f45..3262f93db9c 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -269,11 +269,6 @@ BOOL pe_map_file(HANDLE file, struct image_file_map* fmap, enum module_type mt) switch (nthdr->OptionalHeader.Magic) { case IMAGE_NT_OPTIONAL_HDR32_MAGIC: - if (sizeof(void*) == 8 && !(SymGetOptions() & SYMOPT_INCLUDE_32BIT_MODULES)) - { - TRACE("Won't load 32bit module in 64bit dbghelp when options don't ask for it\n"); - goto error; - } fmap->addr_size = 32; memcpy(&fmap->u.pe.opt.header32, &nthdr->OptionalHeader, sizeof(fmap->u.pe.opt.header32)); break; diff --git a/dlls/dbghelp/tests/dbghelp.c b/dlls/dbghelp/tests/dbghelp.c index 85ec3ce1dbb..7ea5be9c441 100644 --- a/dlls/dbghelp/tests/dbghelp.c +++ b/dlls/dbghelp/tests/dbghelp.c @@ -219,7 +219,6 @@ static void test_modules(void)
/* not always present */ attr = GetFileAttributesA("C:\windows\syswow64\notepad.exe"); - todo_wine_if(sizeof(void*) == 8) if (attr != INVALID_FILE_ATTRIBUTES) { ret = SymLoadModule(GetCurrentProcess(), NULL, "C:\windows\syswow64\notepad.exe", NULL, base2, 0); @@ -227,6 +226,7 @@ static void test_modules(void) ret = SymGetModuleInfoW64(GetCurrentProcess(), base2, &im); ok(ret, "SymGetModuleInfoW64 failed: %lu\n", GetLastError()); ok(im.BaseOfImage == base2, "Wrong base address\n"); + todo_wine_if(sizeof(void*) == 8) ok(im.MachineType == machines[1], "Wrong machine %lx\n", im.MachineType); } @@ -240,12 +240,12 @@ static void test_modules(void) "Wrong machine %lx\n", im.MachineType);
/* still can access first module after loading second */ - todo_wine_if(sizeof(void*) == 8) if (attr != INVALID_FILE_ATTRIBUTES) { ret = SymGetModuleInfoW64(GetCurrentProcess(), base2, &im); ok(ret, "SymGetModuleInfoW64 failed: %lu\n", GetLastError()); ok(im.BaseOfImage == base2, "Wrong base address\n"); + todo_wine_if(sizeof(void*) == 8) ok(im.MachineType == machines[1], "Wrong machine %lx\n", im.MachineType); }