Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34687
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com --- dlls/dbghelp/symbol.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 25169043b6..5500bece7f 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -1478,7 +1478,25 @@ 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 + { + long len; + WCHAR *dospath = wine_get_dos_file_name((char*)source_get(module, dli->u.source_file)); + + len = WideCharToMultiByte(CP_ACP, 0, dospath, -1, NULL, 0, NULL, NULL); + if(len -1) + { + line->FileName = fetch_buffer(module->process, len); + WideCharToMultiByte(CP_ACP, 0, dospath, -1, line->FileName, len, NULL, NULL); + } + + HeapFree( GetProcessHeap(), 0, dospath ); + } return TRUE; } }