summaryrefslogtreecommitdiff
path: root/indra/linux_crash_logger
diff options
context:
space:
mode:
Diffstat (limited to 'indra/linux_crash_logger')
-rwxr-xr-x[-rw-r--r--]indra/linux_crash_logger/CMakeLists.txt12
-rwxr-xr-x[-rw-r--r--]indra/linux_crash_logger/linux_crash_logger.cpp25
-rwxr-xr-x[-rw-r--r--]indra/linux_crash_logger/llcrashloggerlinux.cpp11
-rwxr-xr-x[-rw-r--r--]indra/linux_crash_logger/llcrashloggerlinux.h1
4 files changed, 43 insertions, 6 deletions
diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt
index ab62a0d0af..c0fc1b2be0 100644..100755
--- a/indra/linux_crash_logger/CMakeLists.txt
+++ b/indra/linux_crash_logger/CMakeLists.txt
@@ -3,6 +3,7 @@
project(linux_crash_logger)
include(00-Common)
+include(GLH)
include(LLCommon)
include(LLCrashLogger)
include(LLMath)
@@ -11,6 +12,7 @@ include(LLVFS)
include(LLXML)
include(Linking)
include(UI)
+include(FreeType)
include_directories(
${LLCOMMON_INCLUDE_DIRS}
@@ -18,6 +20,15 @@ include_directories(
${LLMATH_INCLUDE_DIRS}
${LLVFS_INCLUDE_DIRS}
${LLXML_INCLUDE_DIRS}
+ ${FREETYPE_INCLUDE_DIRS}
+ )
+include_directories(SYSTEM
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ ${LLXML_SYSTEM_INCLUDE_DIRS}
+ )
+include_directories(SYSTEM
+ ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
+ ${LLXML_SYSTEM_INCLUDE_DIRS}
)
set(linux_crash_logger_SOURCE_FILES
@@ -52,6 +63,7 @@ target_link_libraries(linux-crash-logger
${LLCOMMON_LIBRARIES}
${UI_LIBRARIES}
${DB_LIBRARIES}
+ ${FREETYPE_LIBRARIES}
)
add_custom_target(linux-crash-logger-target ALL
diff --git a/indra/linux_crash_logger/linux_crash_logger.cpp b/indra/linux_crash_logger/linux_crash_logger.cpp
index 8beae555fb..36f62451d7 100644..100755
--- a/indra/linux_crash_logger/linux_crash_logger.cpp
+++ b/indra/linux_crash_logger/linux_crash_logger.cpp
@@ -24,16 +24,35 @@
* $/LicenseInfo$
*/
+#include "linden_common.h"
#include "llcrashloggerlinux.h"
+#include "llsdutil.h"
int main(int argc, char **argv)
{
+ LL_INFOS() << "Starting crash reporter." << LL_ENDL;
+
LLCrashLoggerLinux app;
app.parseCommandOptions(argc, argv);
- app.init();
+
+ LLSD options = LLApp::instance()->getOptionData(
+ LLApp::PRIORITY_COMMAND_LINE);
+ //LLApp::PRIORITY_RUNTIME_OVERRIDE);
+
+
+ if (!(options.has("pid") && options.has("dumpdir")))
+ {
+ llwarns << "Insufficient parameters to crash report." << llendl;
+ }
+
+ if (! app.init())
+ {
+ LL_WARNS() << "Unable to initialize application." << LL_ENDL;
+ return 1;
+ }
+
app.mainLoop();
app.cleanup();
+ LL_INFOS() << "Crash reporter finished normally." << LL_ENDL;
return 0;
}
-
-
diff --git a/indra/linux_crash_logger/llcrashloggerlinux.cpp b/indra/linux_crash_logger/llcrashloggerlinux.cpp
index 7449c6426f..e2d2e7ff26 100644..100755
--- a/indra/linux_crash_logger/llcrashloggerlinux.cpp
+++ b/indra/linux_crash_logger/llcrashloggerlinux.cpp
@@ -30,8 +30,6 @@
#include "linden_common.h"
-#include "boost/tokenizer.hpp"
-
#include "indra_constants.h" // CRASH_BEHAVIOR_ASK, CRASH_SETTING_NAME
#include "llerror.h"
#include "llfile.h"
@@ -73,7 +71,7 @@ static BOOL do_ask_dialog(void)
#if LL_GTK
gtk_disable_setlocale();
if (!gtk_init_check(NULL, NULL)) {
- llinfos << "Could not initialize GTK for 'ask to send crash report' dialog; not sending report." << llendl;
+ LL_INFOS() << "Could not initialize GTK for 'ask to send crash report' dialog; not sending report." << LL_ENDL;
return FALSE;
}
@@ -135,6 +133,13 @@ bool LLCrashLoggerLinux::mainLoop()
return true;
}
+bool LLCrashLoggerLinux::cleanup()
+{
+ commonCleanup();
+ mKeyMaster.releaseMaster();
+ return true;
+}
+
void LLCrashLoggerLinux::updateApplication(const std::string& message)
{
LLCrashLogger::updateApplication(message);
diff --git a/indra/linux_crash_logger/llcrashloggerlinux.h b/indra/linux_crash_logger/llcrashloggerlinux.h
index 65d5e4e653..dae6c46651 100644..100755
--- a/indra/linux_crash_logger/llcrashloggerlinux.h
+++ b/indra/linux_crash_logger/llcrashloggerlinux.h
@@ -39,6 +39,7 @@ public:
virtual bool mainLoop();
virtual void updateApplication(const std::string& = LLStringUtil::null);
virtual void gatherPlatformSpecificFiles();
+ virtual bool cleanup();
};
#endif