summaryrefslogtreecommitdiff
path: root/indra/win_crash_logger/win_crash_logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/win_crash_logger/win_crash_logger.cpp')
-rwxr-xr-x[-rw-r--r--]indra/win_crash_logger/win_crash_logger.cpp45
1 files changed, 15 insertions, 30 deletions
diff --git a/indra/win_crash_logger/win_crash_logger.cpp b/indra/win_crash_logger/win_crash_logger.cpp
index 5c22053317..366edd894b 100644..100755
--- a/indra/win_crash_logger/win_crash_logger.cpp
+++ b/indra/win_crash_logger/win_crash_logger.cpp
@@ -24,51 +24,36 @@
* $/LicenseInfo$
*/
-// win_crash_logger.cpp : Defines the entry point for the application.
-//
-
-// Must be first include, precompiled headers.
#include "linden_common.h"
-
#include "stdafx.h"
-
#include <stdlib.h>
-
#include "llcrashloggerwindows.h"
-
-
-//
-// Implementation
-//
-
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
- llinfos << "Starting crash reporter" << llendl;
-
+ LL_INFOS() << "Starting crash reporter with args" << &lpCmdLine << LL_ENDL;
LLCrashLoggerWindows app;
app.setHandle(hInstance);
- bool ok = app.init();
- if(!ok)
+ app.parseCommandOptions(__argc, __argv);
+
+ LLSD options = LLApp::instance()->getOptionData(
+ LLApp::PRIORITY_COMMAND_LINE);
+ if (!(options.has("pid") && options.has("dumpdir")))
+ {
+ LL_WARNS() << "Insufficient parameters to crash report." << LL_ENDL;
+ }
+ if (! app.init())
{
- llwarns << "Unable to initialize application." << llendl;
+ LL_WARNS() << "Unable to initialize application." << LL_ENDL;
return -1;
}
- // Run the application main loop
- if(!LLApp::isQuitting()) app.mainLoop();
-
- if (!app.isError())
- {
- //
- // We don't want to do cleanup here if the error handler got called -
- // the assumption is that the error handler is responsible for doing
- // app cleanup if there was a problem.
- //
- app.cleanup();
- }
+ app.processingLoop();
+ app.mainLoop();
+ app.cleanup();
+ LL_INFOS() << "Crash reporter finished normally." << LL_ENDL;
return 0;
}