summaryrefslogtreecommitdiff
path: root/indra/llcrashlogger
diff options
context:
space:
mode:
authorAndrew A. de Laix <alain@lindenlab.com>2010-05-21 09:38:29 -0700
committerAndrew A. de Laix <alain@lindenlab.com>2010-05-21 09:38:29 -0700
commit719edddf0498752a0295502d62710823d1a72cc7 (patch)
tree611f7d53942e8fedb5f732a69fe7a3164ecdec7d /indra/llcrashlogger
parent196420259fe0001749de0efcbccb184c1e8fb47c (diff)
Switch Darwin to use breakpad minidump rather than os generated crash stack.
Diffstat (limited to 'indra/llcrashlogger')
-rwxr-xr-xindra/llcrashlogger/llcrashlogger.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index c1022c1195..8f5aa5ab2d 100755
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -274,6 +274,27 @@ void LLCrashLogger::gatherFiles()
mCrashInfo[(*itr).first] = rawstr_to_utf8(crash_info);
}
+
+ // Add minidump as binary.
+ std::string minidump_path = mDebugLog["MinidumpPath"];
+ if(minidump_path != "")
+ {
+ std::ifstream minidump_stream(minidump_path.c_str(), std::ios_base::in | std::ios_base::binary);
+ if(minidump_stream.is_open())
+ {
+ minidump_stream.seekg(0, std::ios::end);
+ size_t length = minidump_stream.tellg();
+ minidump_stream.seekg(0, std::ios::beg);
+
+ LLSD::Binary data;
+ data.resize(length);
+
+ minidump_stream.read(reinterpret_cast<char *>(&(data[0])),length);
+ minidump_stream.close();
+
+ mCrashInfo["Minidump"] = data;
+ }
+ }
}
LLSD LLCrashLogger::constructPostData()