From: Eric Pouech epouech@codeweavers.com
Always creating public symbols from export table can be slow.
If we already have some debug information, then exported symbols are likely already present.
In extreme cases, this can reduce significantly loading time of module.
Note: in some (rare) cases, this will change current behavior: - if symbol has no debug inforamtion attached to it (assembly...), then no name will be available for it, - if exported symbol name is different from internal one, then only the internal one will be reported.
Signed-off-by: Eric Pouech epouech@codeweavers.com --- dlls/dbghelp/pe_module.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index 6b5a9a4b425..cdb8775f70d 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -779,10 +779,16 @@ BOOL pe_load_debug_info(const struct process* pcs, struct module* module) * in which case we'll rely on the export's on the ELF side */ } - /* FIXME shouldn't we check that? if (!module_get_debug(pcs, module)) */ - if (pe_load_export_debug_info(pcs, module) && !ret) - ret = TRUE; - if (!ret) module->module.SymType = SymNone; + /* FIXME: + * - only loading export debug info in last resort when none of the available formats succeeded + * (assuming export debug info is a subset of actual debug infomation). + */ + if (module->module.SymType == SymDeferred) + { + ret = pe_load_export_debug_info(pcs, module) || ret; + if (module->module.SymType == SymDeferred) + module->module.SymType = SymNone; + } return ret; }