diff options
author | Jose <jose@zeroc.com> | 2018-09-03 12:29:18 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-09-03 12:29:18 +0200 |
commit | 10ed34c8fb0773f3975ddbaa82e5de67f4ad7157 (patch) | |
tree | 8625c27d7e40645efb199b25fd73f79edeb5414b /cpp/src/IceUtil/UtilException.cpp | |
parent | Remove debug statement (diff) | |
download | ice-10ed34c8fb0773f3975ddbaa82e5de67f4ad7157.tar.bz2 ice-10ed34c8fb0773f3975ddbaa82e5de67f4ad7157.tar.xz ice-10ed34c8fb0773f3975ddbaa82e5de67f4ad7157.zip |
call SymRefreshModuleList Close #55
Diffstat (limited to 'cpp/src/IceUtil/UtilException.cpp')
-rw-r--r-- | cpp/src/IceUtil/UtilException.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/IceUtil/UtilException.cpp b/cpp/src/IceUtil/UtilException.cpp index 428af56b37f..acf6fdbc00c 100644 --- a/cpp/src/IceUtil/UtilException.cpp +++ b/cpp/src/IceUtil/UtilException.cpp @@ -379,6 +379,7 @@ getStackTrace(const vector<void*>& stackFrames) // Note: the Sym functions are not thread-safe // IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(globalMutex); + bool refreshModuleList = process != 0; if(process == 0) { process = GetCurrentProcess(); @@ -412,8 +413,10 @@ getStackTrace(const vector<void*>& stackFrames) lock.acquire(); - // TODO: call SymRefreshModuleList here? (not available on XP) - + if(refreshModuleList && SymRefreshModuleList(process) == 0) + { + return "No stack trace: SymRefreshModuleList failed with " + IceUtilInternal::errorToString(GetLastError()); + } #ifdef DBGHELP_TRANSLATE_TCHAR const IceUtil::StringConverterPtr converter = IceUtil::getProcessStringConverter(); #endif |