forked from qt-creator/qt-creator
Linux: Add a crash handler providing a backtrace for debug builds.
Use case: You're working with a debug version of Qt Creator and you're interested in getting a backtrace displayed as soon as Qt Creator crashes without searching for the core file, starting your debugger, ... Once a 'serious signal' (currently SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGPIPE) is delivered, a popup displays the following debug information: - Qt Creator version (same as in the about dialog) - Kernel version (uname -a) - GNU/Linux Distribution (/etc/lsb-release) - Backtrace (by gdb) Please note that this crash handler is built and used only in debug mode on GNU/Linux. It's solely meant as a convenience tool for the developer. In contrast to the breakpad integration, this crash handler operates 'offline'. There is no network i/o involved. Change-Id: Idcfb1bf1ad68942615ecfe0dffc0d03154455049 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
42
src/tools/qtcreatorcrashhandler/utils.h
Normal file
42
src/tools/qtcreatorcrashhandler/utils.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** This file may be used under the terms of the GNU Lesser General Public
|
||||
** License version 2.1 as published by the Free Software Foundation and
|
||||
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
||||
** Please review the following information to ensure the GNU Lesser General
|
||||
** Public License version 2.1 requirements will be met:
|
||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
||||
**
|
||||
** In addition, as a special exception, Nokia gives you certain additional
|
||||
** rights. These rights are described in the Nokia Qt LGPL Exception
|
||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||
**
|
||||
** Other Usage
|
||||
**
|
||||
** Alternatively, this file may be used in accordance with the terms and
|
||||
** conditions contained in a signed written agreement between you and Nokia.
|
||||
**
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
|
||||
const char APPLICATION_NAME[] = "Qt Creator Crash Handler";
|
||||
const char URL_BUGTRACKER[] = "https://bugreports.qt-project.org/";
|
||||
|
||||
QByteArray fileContents(const QString &filePath);
|
||||
|
||||
#endif // UTILS_H
|
||||
Reference in New Issue
Block a user