Attach the GDB backtrace to the report.
This commit is contained in:
parent
3f679a3b84
commit
0cbd12a565
@ -127,10 +127,15 @@ QByteArray gzip_compress(const QByteArray& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
const char* k_usage =
|
||||||
|
"Usage:\n"
|
||||||
|
" CrashReporter <dumpFilePath> <linuxBacktracePath>\n";
|
||||||
|
#else
|
||||||
const char* k_usage =
|
const char* k_usage =
|
||||||
"Usage:\n"
|
"Usage:\n"
|
||||||
" CrashReporter <dumpFilePath>\n";
|
" CrashReporter <dumpFilePath>\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
int main( int argc, char* argv[] )
|
int main( int argc, char* argv[] )
|
||||||
{
|
{
|
||||||
@ -164,7 +169,11 @@ int main( int argc, char* argv[] )
|
|||||||
QApplication app( argc, argv );
|
QApplication app( argc, argv );
|
||||||
CalamaresUtils::installTranslator( QLocale::system(), QString(), &app );
|
CalamaresUtils::installTranslator( QLocale::system(), QString(), &app );
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
if ( app.arguments().size() != 3 )
|
||||||
|
#else
|
||||||
if ( app.arguments().size() != 2 )
|
if ( app.arguments().size() != 2 )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
std::cout << k_usage;
|
std::cout << k_usage;
|
||||||
return 1;
|
return 1;
|
||||||
@ -237,6 +246,16 @@ int main( int argc, char* argv[] )
|
|||||||
QFileInfo( logFile ).fileName().toUtf8());
|
QFileInfo( logFile ).fileName().toUtf8());
|
||||||
logFile.close();
|
logFile.close();
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
QFile backtraceFile( app.arguments().value( 2 ) );
|
||||||
|
backtraceFile.open( QFile::ReadOnly );
|
||||||
|
reporter.setReportData( "upload_file_linux_backtrace",
|
||||||
|
gzip_compress( backtraceFile.readAll() ),
|
||||||
|
"application/x-gzip",
|
||||||
|
QFileInfo( backtraceFile ).fileName().toUtf8());
|
||||||
|
backtraceFile.close();
|
||||||
|
#endif
|
||||||
|
|
||||||
reporter.show();
|
reporter.show();
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
Loading…
Reference in New Issue
Block a user