diff options
author | Bernard Normier <bernard@zeroc.com> | 2012-08-16 10:52:57 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2012-08-16 10:52:57 -0400 |
commit | 3f36ab1c466995bf507bb92cabf09937e0e082f9 (patch) | |
tree | d0abe965cd4eb2893d752de95034d3c2ebb73dce /cpp/src/IceUtil/Exception.cpp | |
parent | ICE-4820 - Service class public API (diff) | |
download | ice-3f36ab1c466995bf507bb92cabf09937e0e082f9.tar.bz2 ice-3f36ab1c466995bf507bb92cabf09937e0e082f9.tar.xz ice-3f36ab1c466995bf507bb92cabf09937e0e082f9.zip |
Stack trace generation on Windows now use Unicode functions and generates a UTF-8 encoded narrow string
Diffstat (limited to 'cpp/src/IceUtil/Exception.cpp')
-rw-r--r-- | cpp/src/IceUtil/Exception.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp index bda16adeff0..3d4a40a91fc 100644 --- a/cpp/src/IceUtil/Exception.cpp +++ b/cpp/src/IceUtil/Exception.cpp @@ -22,6 +22,8 @@ #endif #if defined(_WIN32) && !defined(__MINGW32__) && !defined(ICE_OS_WINRT) +# include <IceUtil/Unicode.h> +# define DBGHELP_TRANSLATE_TCHAR # include <DbgHelp.h> # include <iomanip> # define ICE_STACK_TRACES @@ -138,12 +140,12 @@ getStackTrace() BOOL ok = SymFromAddr(process, address, 0, symbol); if(ok) { - s << symbol->Name; + s << IceUtil::wstringToString(symbol->Name); ok = SymGetLineFromAddr64(process, address, &displacement, &line); if(ok) { - s << " at line " << line.LineNumber << " in " << line.FileName; + s << " at line " << line.LineNumber << " in " << IceUtil::wstringToString(line.FileName); } } else |