From d459301de64b2152671464ab951048f6322c3c3d Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Tue, 7 Sep 2021 09:26:36 +0200 Subject: [PATCH] dbghelp: Make symt_fill_func_line_info() and symt_get_func_line_next() static functions inside symbol.c. Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- 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;