diff options
author | Dave Parks <davep@lindenlab.com> | 2013-03-30 16:28:05 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-03-30 16:28:05 -0500 |
commit | a8816aad3116db7f6572cc5f4e223d73389319ed (patch) | |
tree | bd6753503acbad38773ff6b64f53614c109e67cb /indra | |
parent | 4a6dde3b36c7a9bd7ed6602e291b8436fdbd4378 (diff) | |
parent | 2d713a2815d1c8dc86e62eb29fbd9aacbcefa186 (diff) |
Automated merge with https://bitbucket.org/lindenlab/davep-materials
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/GoogleBreakpad.cmake | 3 | ||||
-rw-r--r-- | indra/llcommon/llapp.cpp | 37 |
2 files changed, 40 insertions, 0 deletions
diff --git a/indra/cmake/GoogleBreakpad.cmake b/indra/cmake/GoogleBreakpad.cmake index 96e22791ec..cabc00ff9a 100644 --- a/indra/cmake/GoogleBreakpad.cmake +++ b/indra/cmake/GoogleBreakpad.cmake @@ -18,5 +18,8 @@ else (STANDALONE) # yes, this does look dumb, no, it's not incorrect # set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/include/google_breakpad/google_breakpad") + # yes, this does look dumb, no, it's not incorrect + # + set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/include/google_breakpad/google_breakpad") endif (STANDALONE) diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index 67e6705cbf..e6f2325653 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -910,6 +910,43 @@ bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_ #endif +#if LL_LINUX +bool unix_minidump_callback(const google_breakpad::MinidumpDescriptor& minidump_desc, void* context, bool succeeded) +{ + // Copy minidump file path into fixed buffer in the app instance to avoid + // heap allocations in a crash handler. + + // path format: <dump_dir>/<minidump_id>.dmp + int dirPathLength = strlen(minidump_desc.path()); + + // The path must not be truncated. + llassert((dirPathLength + 5) <= LLApp::MAX_MINDUMP_PATH_LENGTH); + + char * path = LLApp::instance()->getMiniDumpFilename(); + S32 remaining = LLApp::MAX_MINDUMP_PATH_LENGTH; + strncpy(path, minidump_desc.path(), remaining); + remaining -= dirPathLength; + path += dirPathLength; + if (remaining > 0 && dirPathLength > 0 && path[-1] != '/') + { + *path++ = '/'; + --remaining; + } + + llinfos << "generated minidump: " << LLApp::instance()->getMiniDumpFilename() << llendl; + LLApp::runErrorHandler(); + +#ifndef LL_RELEASE_FOR_DOWNLOAD + clear_signals(); + return false; +#else + return true; +#endif + +} +#endif + + bool unix_post_minidump_callback(const char *dump_dir, const char *minidump_id, void *context, bool succeeded) |