Eric Pouech : dbghelp: Make symt_fill_func_line_info() and symt_get_func_line_next() static functions inside symbol.c.

Alexandre Julliard julliard at winehq.org
Tue Sep 7 16:25:21 CDT 2021


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

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Tue Sep  7 09:26:36 2021 +0200

dbghelp: Make symt_fill_func_line_info() and symt_get_func_line_next() static functions inside symbol.c.

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

---

 dlls/dbghelp/dbghelp_private.h | 4 ----
 dlls/dbghelp/stabs.c           | 6 ++++--
 dlls/dbghelp/symbol.c          | 6 +++---
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h
index 0c324a827e9..162e8bc004d 100644
--- a/dlls/dbghelp/dbghelp_private.h
+++ b/dlls/dbghelp/dbghelp_private.h
@@ -772,10 +772,6 @@ extern struct symt_hierarchy_point*
                                             enum SymTagEnum point, 
                                             const struct location* loc,
                                             const char* name) DECLSPEC_HIDDEN;
-extern BOOL         symt_fill_func_line_info(const struct module* module,
-                                             const struct symt_function* func,
-                                             DWORD64 addr, IMAGEHLP_LINE64* line) DECLSPEC_HIDDEN;
-extern BOOL         symt_get_func_line_next(const struct module* module, PIMAGEHLP_LINE64 line) DECLSPEC_HIDDEN;
 extern struct symt_thunk*
                     symt_new_thunk(struct module* module, 
                                    struct symt_compiland* parent,
diff --git a/dlls/dbghelp/stabs.c b/dlls/dbghelp/stabs.c
index b011c123482..bdafb98bbd4 100644
--- a/dlls/dbghelp/stabs.c
+++ b/dlls/dbghelp/stabs.c
@@ -1193,14 +1193,16 @@ static void stabs_finalize_function(struct module* module, struct symt_function*
 {
     IMAGEHLP_LINE64     il;
     struct location     loc;
+    DWORD               disp;
 
     if (!func) return;
     symt_normalize_function(module, func);
     /* To define the debug-start of the function, we use the second line number.
      * Not 100% bullet proof, but better than nothing
      */
-    if (symt_fill_func_line_info(module, func, func->address, &il) &&
-        symt_get_func_line_next(module, &il))
+    il.SizeOfStruct = sizeof(il);
+    if (SymGetLineFromAddr64(module->process->handle, func->address, &disp, &il) &&
+        SymGetLineNext64(module->process->handle, &il))
     {
         loc.kind = loc_absolute;
         loc.offset = il.Address - func->address;
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index 09407e04fc0..b0e96569f15 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -1521,8 +1521,8 @@ BOOL WINAPI SymGetSymFromName(HANDLE hProcess, PCSTR Name, PIMAGEHLP_SYMBOL Symb
  *
  * fills information about a file
  */
-BOOL symt_fill_func_line_info(const struct module* module, const struct symt_function* func,
-                              DWORD64 addr, IMAGEHLP_LINE64* line)
+static BOOL symt_fill_func_line_info(const struct module* module, const struct symt_function* func,
+                                     DWORD64 addr, IMAGEHLP_LINE64* line)
 {
     struct line_info*   dli = NULL;
     BOOL                found = FALSE;
@@ -1775,7 +1775,7 @@ BOOL WINAPI SymGetLinePrev(HANDLE hProcess, PIMAGEHLP_LINE Line)
     return TRUE;
 }
 
-BOOL symt_get_func_line_next(const struct module* module, PIMAGEHLP_LINE64 line)
+static BOOL symt_get_func_line_next(const struct module* module, PIMAGEHLP_LINE64 line)
 {
     struct line_info*   li;
 




More information about the wine-cvs mailing list