Eric Pouech : dbghelp/dwarf: Initialize module's word_size at module load time.

Alexandre Julliard julliard at winehq.org
Fri Sep 10 15:29:45 CDT 2021


Module: wine
Branch: master
Commit: 7f2eb08304a23cc759b5df37633f9673418d43f7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7f2eb08304a23cc759b5df37633f9673418d43f7

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Wed Sep  8 08:34:44 2021 +0200

dbghelp/dwarf: Initialize module's word_size at module load time.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dbghelp/dwarf.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 435b2a0e3b0..13f1c0e7d9c 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -2409,8 +2409,6 @@ static BOOL dwarf2_parse_compilation_unit(const dwarf2_section_t* sections,
         return FALSE;
     }
 
-    module->format_info[DFI_DWARF]->u.dwarf2_info->word_size = ctx.head.word_size;
-
     pool_init(&ctx.pool, 65536);
     ctx.sections = sections;
     ctx.section = section_debug;
@@ -3570,7 +3568,7 @@ BOOL dwarf2_parse(struct module* module, ULONG_PTR load_offset,
     dwarf2_modfmt->remove = dwarf2_module_remove;
     dwarf2_modfmt->loc_compute = dwarf2_location_compute;
     dwarf2_modfmt->u.dwarf2_info = (struct dwarf2_module_info_s*)(dwarf2_modfmt + 1);
-    dwarf2_modfmt->u.dwarf2_info->word_size = 0; /* will be correctly set later on */
+    dwarf2_modfmt->u.dwarf2_info->word_size = fmap->addr_size / 8; /* set the word_size for eh_frame parsing */
     dwarf2_modfmt->module->format_info[DFI_DWARF] = dwarf2_modfmt;
 
     /* As we'll need later some sections' content, we won't unmap these
@@ -3594,9 +3592,6 @@ BOOL dwarf2_parse(struct module* module, ULONG_PTR load_offset,
     dwarf2_modfmt->module->module.SourceIndexed = TRUE;
     dwarf2_modfmt->module->module.Publics = TRUE;
 
-    /* set the word_size for eh_frame parsing */
-    dwarf2_modfmt->u.dwarf2_info->word_size = fmap->addr_size / 8;
-
 leave:
     dwarf2_fini_section(&section[section_debug]);
     dwarf2_fini_section(&section[section_abbrev]);




More information about the wine-cvs mailing list