Module: wine Branch: master Commit: 6ab88cafaaaa24482454ce856d4039f47a6b5fc1 URL: https://gitlab.winehq.org/wine/wine/-/commit/6ab88cafaaaa24482454ce856d4039f...
Author: Eric Pouech epouech@codeweavers.com Date: Fri Mar 1 13:14:06 2024 +0100
dbghelp: Don't fail in SymAddSymbol for modules without debug information.
Signed-off-by: Eric Pouech epouech@codeweavers.com
---
dlls/dbghelp/module.c | 4 ++-- dlls/dbghelp/tests/path.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 70a57edf3f9..d06c4417be6 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -404,8 +404,9 @@ BOOL module_load_debug(struct module* module) if (!ret) module->module.SymType = SymNone; assert(module->module.SymType != SymDeferred); module->module.NumSyms = module->ht_symbols.num_elts; + return ret; } - return module->module.SymType != SymNone; + return TRUE; }
/****************************************************************** @@ -416,7 +417,6 @@ BOOL module_load_debug(struct module* module) * the module itself) * - if the module has no debug info and has an ELF container, then return the ELF * container (and also force the ELF container's debug info loading if deferred) - * - otherwise return the module itself if it has some debug info */ BOOL module_get_debug(struct module_pair* pair) { diff --git a/dlls/dbghelp/tests/path.c b/dlls/dbghelp/tests/path.c index bf3f20faf2f..e27539643be 100644 --- a/dlls/dbghelp/tests/path.c +++ b/dlls/dbghelp/tests/path.c @@ -1884,7 +1884,6 @@ static void test_load_modules_details(void) SymFromNameW(dummy, L"foo", sym); } ret = SymAddSymbol(dummy, base, "winetest_symbol_virtual", base + 4242, 13, 0); - todo_wine_if(i == 8 || i == 9 || (i >= 12 && i <= 15)) { /* temp */ ok(ret, "Failed to add symbol\n"); memset(sym, 0, sizeof(*sym)); sym->SizeOfStruct = sizeof(*sym); @@ -1899,7 +1898,6 @@ static void test_load_modules_details(void) ret = SymFromNameW(dummy, sym_name, (void*)sym); ok(ret, "Couldn't find symbol %ls\n", sym_name); } - } /* temp */ ret = SymCleanup(dummy); ok(ret, "SymCleanup failed: %lu\n", GetLastError()); for (ptr = test->test_files; *ptr; ptr++)