aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llwindebug.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llwindebug.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llwindebug.cpp')
-rw-r--r--linden/indra/newview/llwindebug.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/linden/indra/newview/llwindebug.cpp b/linden/indra/newview/llwindebug.cpp
index 3f0364b..7607315 100644
--- a/linden/indra/newview/llwindebug.cpp
+++ b/linden/indra/newview/llwindebug.cpp
@@ -31,8 +31,6 @@
31 31
32#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
33 33
34#ifdef LL_WINDOWS
35
36#include <tchar.h> 34#include <tchar.h>
37#include <tlhelp32.h> 35#include <tlhelp32.h>
38#include "llwindebug.h" 36#include "llwindebug.h"
@@ -488,7 +486,7 @@ LLSD WINAPI Get_Exception_Info(PEXCEPTION_POINTERS pException)
488 486
489 // Save instruction that caused exception. 487 // Save instruction that caused exception.
490 /* 488 /*
491 LLString str; 489 std::string str;
492 for (i = 0; i < 16; i++) 490 for (i = 0; i < 16; i++)
493 str += llformat(" %02X", PBYTE(E.ExceptionAddress)[i]); 491 str += llformat(" %02X", PBYTE(E.ExceptionAddress)[i]);
494 info["Instruction"] = str; 492 info["Instruction"] = str;
@@ -641,7 +639,7 @@ bool LLWinDebug::checkExceptionHandler()
641 return ok; 639 return ok;
642} 640}
643 641
644void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const char *filename) 642void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename)
645{ 643{
646 if(f_mdwp == NULL || gDirUtilp == NULL) 644 if(f_mdwp == NULL || gDirUtilp == NULL)
647 { 645 {
@@ -650,8 +648,7 @@ void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMAT
650 } 648 }
651 else 649 else
652 { 650 {
653 std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, 651 std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename);
654 filename);
655 652
656 HANDLE hFile = CreateFileA(dump_path.c_str(), 653 HANDLE hFile = CreateFileA(dump_path.c_str(),
657 GENERIC_WRITE, 654 GENERIC_WRITE,
@@ -736,9 +733,7 @@ void LLWinDebug::generateCrashStacks(struct _EXCEPTION_POINTERS *exception_infop
736 733
737 info["Threads"] = threads; 734 info["Threads"] = threads;
738 735
739 std::ofstream out_file(log_path.c_str()); 736 llofstream out_file(log_path);
740 LLSDSerialize::toPrettyXML(info, out_file); 737 LLSDSerialize::toPrettyXML(info, out_file);
741 out_file.close(); 738 out_file.close();
742} 739}
743
744#endif