https://git.reactos.org/?p=reactos.git;a=commitdiff;h=52fe27663259e901c7ac8630fe23b7f76afebd4f

commit 52fe27663259e901c7ac8630fe23b7f76afebd4f
Author:     Jérôme Gardou <jerome.gar...@reactos.org>
AuthorDate: Fri Sep 11 15:44:49 2020 +0200
Commit:     Jérôme Gardou <jerome.gar...@reactos.org>
CommitDate: Wed Sep 16 10:35:36 2020 +0200

    Revert "[DBGHELP] set correct values in symt_fill_sym_info (SYMBOL_INFO)."
    
    This reverts commit 6175044aed2858637a6d07aa2be1e8d2252fe9db.
    
    This will be applied later through the winesync script
---
 dll/win32/dbghelp/dbghelp_private.h |  5 +----
 dll/win32/dbghelp/msc.c             |  5 +----
 dll/win32/dbghelp/pe_module.c       | 13 ++++++-------
 dll/win32/dbghelp/rsym.c            |  2 +-
 dll/win32/dbghelp/symbol.c          | 13 +++----------
 5 files changed, 12 insertions(+), 26 deletions(-)

diff --git a/dll/win32/dbghelp/dbghelp_private.h 
b/dll/win32/dbghelp/dbghelp_private.h
index bdfca1d2934..759aaa93c98 100644
--- a/dll/win32/dbghelp/dbghelp_private.h
+++ b/dll/win32/dbghelp/dbghelp_private.h
@@ -244,7 +244,6 @@ struct symt_public
     struct symt                 symt;
     struct hash_table_elt       hash_elt;
     struct symt*                container;      /* compiland */
-    BOOL is_function;
     unsigned long               address;
     unsigned long               size;
 };
@@ -756,9 +755,7 @@ extern struct symt_public*
                     symt_new_public(struct module* module,
                                     struct symt_compiland* parent,
                                     const char* typename,
-                                    BOOL is_function,
-                                    unsigned long address,
-                                    unsigned size) DECLSPEC_HIDDEN;
+                                    unsigned long address, unsigned size) 
DECLSPEC_HIDDEN;
 extern struct symt_data*
                     symt_new_global_variable(struct module* module,
                                              struct symt_compiland* parent,
diff --git a/dll/win32/dbghelp/msc.c b/dll/win32/dbghelp/msc.c
index 768ed93f889..ad01d0fa482 100644
--- a/dll/win32/dbghelp/msc.c
+++ b/dll/win32/dbghelp/msc.c
@@ -2072,7 +2072,6 @@ static BOOL codeview_snarf_public(const struct 
msc_debug_info* msc_dbg, const BY
             {
                 symt_new_public(msc_dbg->module, compiland,
                                 terminate_string(&sym->public_v1.p_name),
-                                sym->public_v1.symtype == SYMTYPE_FUNCTION,
                                 codeview_get_address(msc_dbg, 
sym->public_v1.segment, sym->public_v1.offset), 1);
             }
             break;
@@ -2081,7 +2080,6 @@ static BOOL codeview_snarf_public(const struct 
msc_debug_info* msc_dbg, const BY
             {
                 symt_new_public(msc_dbg->module, compiland,
                                 terminate_string(&sym->public_v2.p_name),
-                                sym->public_v3.symtype == SYMTYPE_FUNCTION,
                                 codeview_get_address(msc_dbg, 
sym->public_v2.segment, sym->public_v2.offset), 1);
             }
            break;
@@ -2091,7 +2089,6 @@ static BOOL codeview_snarf_public(const struct 
msc_debug_info* msc_dbg, const BY
             {
                 symt_new_public(msc_dbg->module, compiland,
                                 sym->public_v3.name,
-                                sym->public_v3.symtype == SYMTYPE_FUNCTION,
                                 codeview_get_address(msc_dbg, 
sym->public_v3.segment, sym->public_v3.offset), 1);
             }
             break;
@@ -2888,7 +2885,7 @@ static BOOL pdb_process_file(const struct process* pcs,
     if (ret)
     {
         struct pdb_module_info*     pdb_info = 
msc_dbg->module->format_info[DFI_PDB]->u.pdb_info;
-        msc_dbg->module->module.SymType = SymPdb;
+        msc_dbg->module->module.SymType = SymCv;
         if (pdb_info->pdb_files[0].kind == PDB_JG)
             msc_dbg->module->module.PdbSig = 
pdb_info->pdb_files[0].u.jg.timestamp;
         else
diff --git a/dll/win32/dbghelp/pe_module.c b/dll/win32/dbghelp/pe_module.c
index 8e48fd8bbda..4b9eac4f032 100644
--- a/dll/win32/dbghelp/pe_module.c
+++ b/dll/win32/dbghelp/pe_module.c
@@ -444,9 +444,9 @@ static BOOL pe_load_coff_symbol_table(struct module* module)
                                                source_new(module, NULL, 
lastfilename));
 
             if (!(dbghelp_options & SYMOPT_NO_PUBLICS))
-                symt_new_public(module, compiland, name, FALSE,
+                symt_new_public(module, compiland, name,
                                 module->module.BaseOfImage + 
sect[isym->SectionNumber - 1].VirtualAddress +
-                                    isym->Value,
+                                     isym->Value,
                                 1);
         }
         naux = isym->NumberOfAuxSymbols + 1;
@@ -674,11 +674,11 @@ static BOOL pe_load_export_debug_info(const struct 
process* pcs, struct module*
 #if 0
     /* Add start of DLL (better use the (yet unimplemented) Exe SymTag for 
this) */
     /* FIXME: module.ModuleName isn't correctly set yet if it's passed in 
SymLoadModule */
-    symt_new_public(module, NULL, module->module.ModuleName, FALSE, base, 1);
+    symt_new_public(module, NULL, module->module.ModuleName, base, 1);
 #endif
     
     /* Add entry point */
-    symt_new_public(module, NULL, "EntryPoint", FALSE,
+    symt_new_public(module, NULL, "EntryPoint", 
                     base + nth->OptionalHeader.AddressOfEntryPoint, 1);
 #if 0
     /* FIXME: we'd better store addresses linked to sections rather than 
@@ -689,7 +689,7 @@ static BOOL pe_load_export_debug_info(const struct process* 
pcs, struct module*
         ((char*)&nth->OptionalHeader + nth->FileHeader.SizeOfOptionalHeader);
     for (i = 0; i < nth->FileHeader.NumberOfSections; i++, section++) 
     {
-       symt_new_public(module, NULL, section->Name, FALSE,
+       symt_new_public(module, NULL, section->Name, 
                         RtlImageRvaToVa(nth, mapping, section->VirtualAddress, 
NULL), 1);
     }
 #endif
@@ -715,7 +715,6 @@ static BOOL pe_load_export_debug_info(const struct process* 
pcs, struct module*
                 if (!names[i]) continue;
                 symt_new_public(module, NULL,
                                 RtlImageRvaToVa(nth, mapping, names[i], NULL),
-                                FALSE,
                                 base + functions[ordinals[i]], 1);
             }
 
@@ -727,7 +726,7 @@ static BOOL pe_load_export_debug_info(const struct process* 
pcs, struct module*
                     if ((ordinals[j] == i) && names[j]) break;
                 if (j < exports->NumberOfNames) continue;
                 snprintf(buffer, sizeof(buffer), "%d", i + exports->Base);
-                symt_new_public(module, NULL, buffer, FALSE, base + 
(DWORD)functions[i], 1);
+                symt_new_public(module, NULL, buffer, base + 
(DWORD)functions[i], 1);
             }
         }
     }
diff --git a/dll/win32/dbghelp/rsym.c b/dll/win32/dbghelp/rsym.c
index de4b3150852..9b7bf4ee1d7 100644
--- a/dll/win32/dbghelp/rsym.c
+++ b/dll/win32/dbghelp/rsym.c
@@ -125,7 +125,7 @@ BOOL rsym_parse(struct module* module, unsigned long 
load_offset,
                     if (use_raw_address(SymbolName))
                         Address = Entry->Address;
 
-                    symt_new_public(module, NULL, SymbolName, FALSE, Address, 
Size);
+                    symt_new_public(module, NULL, SymbolName, Address, Size);
                 }
                 else
                 {
diff --git a/dll/win32/dbghelp/symbol.c b/dll/win32/dbghelp/symbol.c
index 38d2a5b7291..2a0710b658d 100644
--- a/dll/win32/dbghelp/symbol.c
+++ b/dll/win32/dbghelp/symbol.c
@@ -226,7 +226,6 @@ struct symt_compiland* symt_new_compiland(struct module* 
module,
 struct symt_public* symt_new_public(struct module* module, 
                                     struct symt_compiland* compiland,
                                     const char* name,
-                                    BOOL is_function,
                                     unsigned long address, unsigned size)
 {
     struct symt_public* sym;
@@ -242,7 +241,6 @@ struct symt_public* symt_new_public(struct module* module,
         sym->symt.tag      = SymTagPublicSymbol;
         sym->hash_elt.name = pool_strdup(&module->pool, name);
         sym->container     = compiland ? &compiland->symt : NULL;
-        sym->is_function   = is_function;
         sym->address       = address;
         sym->size          = size;
         symt_add_module_ht(module, (struct symt_ht*)sym);
@@ -699,16 +697,11 @@ static void symt_fill_sym_info(struct module_pair* pair,
         }
         break;
     case SymTagPublicSymbol:
-        {
-            const struct symt_public* pub = (const struct symt_public*)sym;
-            if (pub->is_function)
-                sym_info->Flags |= SYMFLAG_PUBLIC_CODE;
-            else
-                sym_info->Flags |= SYMFLAG_EXPORT;
-            symt_get_address(sym, &sym_info->Address);
-        }
+        sym_info->Flags |= SYMFLAG_EXPORT;
+        symt_get_address(sym, &sym_info->Address);
         break;
     case SymTagFunction:
+        sym_info->Flags |= SYMFLAG_FUNCTION;
         symt_get_address(sym, &sym_info->Address);
         break;
     case SymTagThunk:

Reply via email to