Alistair Leslie-Hughes : dbghelp: Return a dos path from SymGetLineFromAddr.

Alexandre Julliard julliard at winehq.org
Mon Jun 17 15:54:21 CDT 2019


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

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Thu Jun 13 08:29:58 2019 +0000

dbghelp: Return a dos path from SymGetLineFromAddr.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34687
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dbghelp/symbol.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index 2516904..3689500 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -1478,7 +1478,19 @@ BOOL symt_fill_func_line_info(const struct module* module, const struct symt_fun
         }
         if (found)
         {
-            line->FileName = (char*)source_get(module, dli->u.source_file);
+            if (dbghelp_opt_native)
+            {
+                /* Return native file paths when using winedbg */
+                line->FileName = (char*)source_get(module, dli->u.source_file);
+            }
+            else
+            {
+                WCHAR *dospath = wine_get_dos_file_name(source_get(module, dli->u.source_file));
+                DWORD len = WideCharToMultiByte(CP_ACP, 0, dospath, -1, NULL, 0, NULL, NULL);
+                line->FileName = fetch_buffer(module->process, len);
+                WideCharToMultiByte(CP_ACP, 0, dospath, -1, line->FileName, len, NULL, NULL);
+                HeapFree( GetProcessHeap(), 0, dospath );
+            }
             return TRUE;
         }
     }




More information about the wine-cvs mailing list