[PATCH 4/7] dbghelp: use module->modulename instead of module->module.ModuleName in traces

Eric Pouech eric.pouech at gmail.com
Mon Sep 6 03:40:08 CDT 2021


the former is truncated to 64 chars while the later is truncated to 32
chars

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---
 dlls/dbghelp/dwarf.c        |    6 +++---
 dlls/dbghelp/elf_module.c   |   12 ++++++------
 dlls/dbghelp/macho_module.c |    8 ++++----
 dlls/dbghelp/module.c       |    4 ++--
 dlls/dbghelp/msc.c          |    2 +-
 dlls/dbghelp/pe_module.c    |    2 +-
 dlls/dbghelp/symbol.c       |   20 ++++++++++----------
 dlls/dbghelp/type.c         |    4 ++--
 8 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index e514a4fde3b..319f5c2673c 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -357,7 +357,7 @@ static const char* dwarf2_debug_traverse_ctx(const dwarf2_traverse_context_t* ct
 static const char* dwarf2_debug_ctx(const dwarf2_parse_context_t* ctx)
 {
     return wine_dbg_sprintf("ctx(%p,%s)",
-                            ctx, debugstr_w(ctx->module->module.ModuleName));
+                            ctx, debugstr_w(ctx->module->modulename));
 }
 
 static const char* dwarf2_debug_di(const dwarf2_debug_info_t* di)
@@ -2130,7 +2130,7 @@ static void dwarf2_set_line_number(struct module* module, ULONG_PTR address,
     if (!file || !(psrc = vector_at(v, file - 1))) return;
 
     TRACE("%s %lx %s %u\n",
-          debugstr_w(module->module.ModuleName), address, debugstr_a(source_get(module, *psrc)), line);
+          debugstr_w(module->modulename), address, debugstr_a(source_get(module, *psrc)), line);
     symt = symt_find_nearest(module, address);
     if (symt && symt_check_tag(&symt->symt, SymTagFunction))
     {
@@ -3498,7 +3498,7 @@ BOOL dwarf2_parse(struct module* module, ULONG_PTR load_offset,
         load_offset += fmap->u.elf.elf_start - debug_sect.fmap->u.elf.elf_start;
     }
 
-    TRACE("Loading Dwarf2 information for %s\n", debugstr_w(module->module.ModuleName));
+    TRACE("Loading Dwarf2 information for %s\n", debugstr_w(module->modulename));
 
     mod_ctx.data = section[section_debug].address;
     mod_ctx.end_data = mod_ctx.data + section[section_debug].size;
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 7be7e8efce6..cc3fbcdb7ba 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -803,7 +803,7 @@ static const struct elf_sym *elf_lookup_symtab(const struct module* module,
     if (!result && !(result = weak_result))
     {
         FIXME("Couldn't find symbol %s!%s in symtab\n",
-              debugstr_w(module->module.ModuleName), name);
+              debugstr_w(module->modulename), name);
         return NULL;
     }
     return &result->sym;
@@ -847,19 +847,19 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table
                 if (((struct symt_function*)sym)->address != elf_info->elf_addr &&
                     ((struct symt_function*)sym)->address != elf_info->elf_addr + symp->st_value)
                     FIXME("Changing address for %p/%s!%s from %08lx to %s\n",
-                          sym, debugstr_w(module->module.ModuleName), sym->hash_elt.name,
+                          sym, debugstr_w(module->modulename), sym->hash_elt.name,
                           ((struct symt_function*)sym)->address,
                           wine_dbgstr_longlong(elf_info->elf_addr + symp->st_value));
                 if (((struct symt_function*)sym)->size && ((struct symt_function*)sym)->size != symp->st_size)
                     FIXME("Changing size for %p/%s!%s from %08lx to %08x\n",
-                          sym, debugstr_w(module->module.ModuleName), sym->hash_elt.name,
+                          sym, debugstr_w(module->modulename), sym->hash_elt.name,
                           ((struct symt_function*)sym)->size, (unsigned int)symp->st_size);
 
                 ((struct symt_function*)sym)->address = elf_info->elf_addr + symp->st_value;
                 ((struct symt_function*)sym)->size    = symp->st_size;
             } else
                 FIXME("Couldn't find %s!%s\n",
-                      debugstr_w(module->module.ModuleName), sym->hash_elt.name);
+                      debugstr_w(module->modulename), sym->hash_elt.name);
             break;
         case SymTagData:
             switch (((struct symt_data*)sym)->kind)
@@ -876,7 +876,7 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table
                     if (((struct symt_data*)sym)->u.var.offset != elf_info->elf_addr &&
                         ((struct symt_data*)sym)->u.var.offset != elf_info->elf_addr + symp->st_value)
                         FIXME("Changing address for %p/%s!%s from %08lx to %s\n",
-                              sym, debugstr_w(module->module.ModuleName), sym->hash_elt.name,
+                              sym, debugstr_w(module->modulename), sym->hash_elt.name,
                               ((struct symt_function*)sym)->address,
                               wine_dbgstr_longlong(elf_info->elf_addr + symp->st_value));
                     ((struct symt_data*)sym)->u.var.offset = elf_info->elf_addr + symp->st_value;
@@ -884,7 +884,7 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table
                         DataIsFileStatic : DataIsGlobal;
                 } else
                     FIXME("Couldn't find %s!%s\n",
-                          debugstr_w(module->module.ModuleName), sym->hash_elt.name);
+                          debugstr_w(module->modulename), sym->hash_elt.name);
                 break;
             default:;
             }
diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c
index 7b0b80c4900..7b17d1c30df 100644
--- a/dlls/dbghelp/macho_module.c
+++ b/dlls/dbghelp/macho_module.c
@@ -1066,7 +1066,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt
                 if (func->address == module->format_info[DFI_MACHO]->u.macho_info->load_addr)
                 {
                     TRACE("Adjusting function %p/%s!%s from 0x%08lx to 0x%08lx\n", func,
-                          debugstr_w(module->module.ModuleName), sym->hash_elt.name,
+                          debugstr_w(module->modulename), sym->hash_elt.name,
                           func->address, ste->addr);
                     func->address = ste->addr;
                     adjusted = TRUE;
@@ -1083,7 +1083,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt
                     if (data->u.var.offset == module->format_info[DFI_MACHO]->u.macho_info->load_addr)
                     {
                         TRACE("Adjusting data symbol %p/%s!%s from 0x%08lx to 0x%08lx\n",
-                              data, debugstr_w(module->module.ModuleName), sym->hash_elt.name,
+                              data, debugstr_w(module->modulename), sym->hash_elt.name,
                               data->u.var.offset, ste->addr);
                         data->u.var.offset = ste->addr;
                         adjusted = TRUE;
@@ -1096,7 +1096,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt
                         if (data->kind != new_kind)
                         {
                             WARN("Changing kind for %p/%s!%s from %d to %d\n", sym,
-                                 debugstr_w(module->module.ModuleName), sym->hash_elt.name,
+                                 debugstr_w(module->modulename), sym->hash_elt.name,
                                  (int)data->kind, (int)new_kind);
                             data->kind = new_kind;
                             adjusted = TRUE;
@@ -1155,7 +1155,7 @@ static void macho_finish_stabs(struct module* module, struct hash_table* ht_symt
                 symt_get_info(module, &sym->symt, TI_GET_DATAKIND, &kind);
                 if (size && kind == (ste->is_global ? DataIsGlobal : DataIsFileStatic))
                     FIXME("Duplicate in %s: %s<%08lx> %s<%s-%s>\n",
-                          debugstr_w(module->module.ModuleName),
+                          debugstr_w(module->modulename),
                           ste->ht_elt.name, ste->addr,
                           sym->hash_elt.name,
                           wine_dbgstr_longlong(addr), wine_dbgstr_longlong(size));
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index e0d1dce0c86..df341284d6a 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -715,7 +715,7 @@ BOOL image_check_alternate(struct image_file_map* fmap, const struct module* mod
             ret = image_locate_debug_link(module, fmap, dbg_link, crc);
             if (!ret)
                 WARN("Couldn't load linked debug file for %s\n",
-                     debugstr_w(module->module.ModuleName));
+                     debugstr_w(module->modulename));
         }
         image_unmap_section(&debuglink_sect);
     }
@@ -882,7 +882,7 @@ BOOL module_remove(struct process* pcs, struct module* module)
     struct module**     p;
     unsigned            i;
 
-    TRACE("%s (%p)\n", debugstr_w(module->module.ModuleName), module);
+    TRACE("%s (%p)\n", debugstr_w(module->modulename), module);
 
     for (i = 0; i < DFI_LAST; i++)
     {
diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c
index 905e3b0eaf1..36ab355d0a3 100644
--- a/dlls/dbghelp/msc.c
+++ b/dlls/dbghelp/msc.c
@@ -3369,7 +3369,7 @@ static BOOL codeview_process_info(const struct process* pcs,
     }
     default:
         ERR("Unknown CODEVIEW signature %08x in module %s\n",
-            *signature, debugstr_w(msc_dbg->module->module.ModuleName));
+            *signature, debugstr_w(msc_dbg->module->modulename));
         break;
     }
     if (ret)
diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c
index 7cfe5f4dc37..383d2b52429 100644
--- a/dlls/dbghelp/pe_module.c
+++ b/dlls/dbghelp/pe_module.c
@@ -625,7 +625,7 @@ static BOOL pe_load_msc_debug_info(const struct process* pcs, struct module* mod
             misc->DataType != IMAGE_DEBUG_MISC_EXENAME)
         {
             ERR("-Debug info stripped, but no .DBG file in module %s\n",
-                debugstr_w(module->module.ModuleName));
+                debugstr_w(module->modulename));
         }
         else
         {
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index 9863a736299..7e79950906a 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -187,7 +187,7 @@ struct symt_module* symt_new_module(struct module* module)
 {
     struct symt_module*    sym;
 
-    TRACE_(dbghelp_symt)("Adding toplevel exe symbol %s\n", debugstr_w(module->module.ModuleName));
+    TRACE_(dbghelp_symt)("Adding toplevel exe symbol %s\n", debugstr_w(module->modulename));
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
         sym->symt.tag = SymTagExe;
@@ -202,7 +202,7 @@ struct symt_compiland* symt_new_compiland(struct module* module,
     struct symt_compiland*    sym;
 
     TRACE_(dbghelp_symt)("Adding compiland symbol %s:%s\n",
-                         debugstr_w(module->module.ModuleName), source_get(module, src_idx));
+                         debugstr_w(module->modulename), source_get(module, src_idx));
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
         sym->symt.tag  = SymTagCompiland;
@@ -224,7 +224,7 @@ struct symt_public* symt_new_public(struct module* module,
     struct symt**       p;
 
     TRACE_(dbghelp_symt)("Adding public symbol %s:%s @%lx\n",
-                         debugstr_w(module->module.ModuleName), name, address);
+                         debugstr_w(module->modulename), name, address);
     if ((dbghelp_options & SYMOPT_AUTO_PUBLICS) &&
         symt_find_nearest(module, address) != NULL)
         return NULL;
@@ -257,7 +257,7 @@ struct symt_data* symt_new_global_variable(struct module* module,
     DWORD64             tsz;
 
     TRACE_(dbghelp_symt)("Adding global symbol %s:%s %d@%lx %p\n",
-                         debugstr_w(module->module.ModuleName), name, loc.kind, loc.offset, type);
+                         debugstr_w(module->modulename), name, loc.kind, loc.offset, type);
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
         sym->symt.tag      = SymTagData;
@@ -270,7 +270,7 @@ struct symt_data* symt_new_global_variable(struct module* module,
         {
             if (tsz != size)
                 FIXME("Size mismatch for %s.%s between type (%s) and src (%lu)\n",
-                      debugstr_w(module->module.ModuleName), name,
+                      debugstr_w(module->modulename), name,
                       wine_dbgstr_longlong(tsz), size);
         }
         symt_add_module_ht(module, (struct symt_ht*)sym);
@@ -293,7 +293,7 @@ struct symt_function* symt_new_function(struct module* module,
     struct symt**               p;
 
     TRACE_(dbghelp_symt)("Adding global function %s:%s @%lx-%lx\n",
-                         debugstr_w(module->module.ModuleName), name, addr, addr + size - 1);
+                         debugstr_w(module->modulename), name, addr, addr + size - 1);
 
     assert(!sig_type || sig_type->tag == SymTagFunctionType);
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
@@ -379,7 +379,7 @@ struct symt_data* symt_add_func_local(struct module* module,
     struct symt**       p;
 
     TRACE_(dbghelp_symt)("Adding local symbol (%s:%s): %s %p\n",
-                         debugstr_w(module->module.ModuleName), func->hash_elt.name,
+                         debugstr_w(module->modulename), func->hash_elt.name,
                          name, type);
 
     assert(func);
@@ -494,7 +494,7 @@ struct symt_thunk* symt_new_thunk(struct module* module,
     struct symt_thunk*  sym;
 
     TRACE_(dbghelp_symt)("Adding global thunk %s:%s @%lx-%lx\n",
-                         debugstr_w(module->module.ModuleName), name, addr, addr + size - 1);
+                         debugstr_w(module->modulename), name, addr, addr + size - 1);
 
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
@@ -523,7 +523,7 @@ struct symt_data* symt_new_constant(struct module* module,
     struct symt_data*  sym;
 
     TRACE_(dbghelp_symt)("Adding constant value %s:%s\n",
-                         debugstr_w(module->module.ModuleName), name);
+                         debugstr_w(module->modulename), name);
 
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
@@ -551,7 +551,7 @@ struct symt_hierarchy_point* symt_new_label(struct module* module,
     struct symt_hierarchy_point*        sym;
 
     TRACE_(dbghelp_symt)("Adding global label value %s:%s\n",
-                         debugstr_w(module->module.ModuleName), name);
+                         debugstr_w(module->modulename), name);
 
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
diff --git a/dlls/dbghelp/type.c b/dlls/dbghelp/type.c
index 7ce85531162..23752cfed9f 100644
--- a/dlls/dbghelp/type.c
+++ b/dlls/dbghelp/type.c
@@ -222,7 +222,7 @@ struct symt_udt* symt_new_udt(struct module* module, const char* typename,
     struct symt_udt*            sym;
 
     TRACE_(dbghelp_symt)("Adding udt %s:%s\n",
-                         debugstr_w(module->module.ModuleName), typename);
+                         debugstr_w(module->modulename), typename);
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
         sym->symt.tag = SymTagUDT;
@@ -308,7 +308,7 @@ struct symt_enum* symt_new_enum(struct module* module, const char* typename,
     struct symt_enum*   sym;
 
     TRACE_(dbghelp_symt)("Adding enum %s:%s\n",
-                         debugstr_w(module->module.ModuleName), typename);
+                         debugstr_w(module->modulename), typename);
     if ((sym = pool_alloc(&module->pool, sizeof(*sym))))
     {
         sym->symt.tag            = SymTagEnum;




More information about the wine-devel mailing list