summaryrefslogtreecommitdiff
path: root/indra/newview/llwindebug.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-07-27 14:13:07 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-07-27 14:13:07 -0700
commit0e06dc8964d5ae31fccb2da522d05d822530d3c7 (patch)
treed15dfd4ab9dfc4724efe62373cbca6a24c97006b /indra/newview/llwindebug.cpp
parent4c9760a073853ae81a78aa99119c059cdfaba664 (diff)
parentfe8a5a007ab82f3d6a763c5cb133e1299d238632 (diff)
Merge from dessie/viewer-release
Diffstat (limited to 'indra/newview/llwindebug.cpp')
-rw-r--r--indra/newview/llwindebug.cpp61
1 files changed, 26 insertions, 35 deletions
diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp
index 660245b02b..502fefd4ef 100644
--- a/indra/newview/llwindebug.cpp
+++ b/indra/newview/llwindebug.cpp
@@ -97,9 +97,6 @@ void LLWinDebug::init()
// Load the dbghelp dll now, instead of waiting for the crash.
// Less potential for stack mangling
- // Don't install vectored exception handler if being debugged.
- if(IsDebuggerPresent()) return;
-
if (s_first_run)
{
// First, try loading from the directory that the app resides in.
@@ -138,42 +135,36 @@ void LLWinDebug::init()
void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const std::string& filename)
{
- // Temporary fix to switch out the code that writes the DMP file.
- // Fix coming that doesn't write a mini dump file for regular C++ exceptions.
- const bool enable_write_dump_file = false;
- if ( enable_write_dump_file )
+ if(f_mdwp == NULL || gDirUtilp == NULL)
{
- if(f_mdwp == NULL || gDirUtilp == NULL)
- {
- return;
- }
- else
- {
- std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename);
-
- HANDLE hFile = CreateFileA(dump_path.c_str(),
- GENERIC_WRITE,
- FILE_SHARE_WRITE,
- NULL,
- CREATE_ALWAYS,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
+ return;
+ }
+ else
+ {
+ std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, filename);
- if (hFile != INVALID_HANDLE_VALUE)
- {
- // Write the dump, ignoring the return value
- f_mdwp(GetCurrentProcess(),
- GetCurrentProcessId(),
- hFile,
- type,
- ExInfop,
- NULL,
- NULL);
-
- CloseHandle(hFile);
- }
+ HANDLE hFile = CreateFileA(dump_path.c_str(),
+ GENERIC_WRITE,
+ FILE_SHARE_WRITE,
+ NULL,
+ CREATE_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL);
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ // Write the dump, ignoring the return value
+ f_mdwp(GetCurrentProcess(),
+ GetCurrentProcessId(),
+ hFile,
+ type,
+ ExInfop,
+ NULL,
+ NULL);
+
+ CloseHandle(hFile);
}
+
}
}