forked from qt-creator/qt-creator
Debugger: Added name demangler.
This commit is contained in:
@@ -3,7 +3,6 @@ TARGET = Debugger
|
|||||||
|
|
||||||
# DEFINES += QT_USE_FAST_OPERATOR_PLUS
|
# DEFINES += QT_USE_FAST_OPERATOR_PLUS
|
||||||
# DEFINES += QT_USE_FAST_CONCATENATION
|
# DEFINES += QT_USE_FAST_CONCATENATION
|
||||||
|
|
||||||
# CONFIG += single
|
# CONFIG += single
|
||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
include(../../plugins/coreplugin/coreplugin.pri)
|
include(../../plugins/coreplugin/coreplugin.pri)
|
||||||
@@ -14,11 +13,10 @@ include(../../plugins/texteditor/texteditor.pri)
|
|||||||
include(../../libs/cplusplus/cplusplus.pri)
|
include(../../libs/cplusplus/cplusplus.pri)
|
||||||
include(../../libs/utils/utils.pri)
|
include(../../libs/utils/utils.pri)
|
||||||
INCLUDEPATH += $$PWD/../../libs/utils
|
INCLUDEPATH += $$PWD/../../libs/utils
|
||||||
|
QT += gui \
|
||||||
QT += gui network script
|
network \
|
||||||
|
script
|
||||||
HEADERS += \
|
HEADERS += breakhandler.h \
|
||||||
breakhandler.h \
|
|
||||||
breakwindow.h \
|
breakwindow.h \
|
||||||
debuggeragents.h \
|
debuggeragents.h \
|
||||||
debuggeractions.h \
|
debuggeractions.h \
|
||||||
@@ -44,9 +42,8 @@ HEADERS += \
|
|||||||
threadswindow.h \
|
threadswindow.h \
|
||||||
watchhandler.h \
|
watchhandler.h \
|
||||||
watchwindow.h \
|
watchwindow.h \
|
||||||
|
name_demangler.h
|
||||||
SOURCES += \
|
SOURCES += breakhandler.cpp \
|
||||||
breakhandler.cpp \
|
|
||||||
breakwindow.cpp \
|
breakwindow.cpp \
|
||||||
breakwindow.h \
|
breakwindow.h \
|
||||||
debuggeragents.cpp \
|
debuggeragents.cpp \
|
||||||
@@ -70,7 +67,7 @@ SOURCES += \
|
|||||||
threadswindow.cpp \
|
threadswindow.cpp \
|
||||||
watchhandler.cpp \
|
watchhandler.cpp \
|
||||||
watchwindow.cpp \
|
watchwindow.cpp \
|
||||||
|
name_demangler.cpp
|
||||||
FORMS += attachexternaldialog.ui \
|
FORMS += attachexternaldialog.ui \
|
||||||
attachcoredialog.ui \
|
attachcoredialog.ui \
|
||||||
attachtcfdialog.ui \
|
attachtcfdialog.ui \
|
||||||
@@ -79,21 +76,16 @@ FORMS += attachexternaldialog.ui \
|
|||||||
dumperoptionpage.ui \
|
dumperoptionpage.ui \
|
||||||
commonoptionspage.ui \
|
commonoptionspage.ui \
|
||||||
startexternaldialog.ui \
|
startexternaldialog.ui \
|
||||||
startremotedialog.ui \
|
startremotedialog.ui
|
||||||
|
|
||||||
RESOURCES += debugger.qrc
|
RESOURCES += debugger.qrc
|
||||||
|
|
||||||
false {
|
false {
|
||||||
SOURCES += $$PWD/modeltest.cpp
|
SOURCES += $$PWD/modeltest.cpp
|
||||||
HEADERS += $$PWD/modeltest.h
|
HEADERS += $$PWD/modeltest.h
|
||||||
DEFINES += USE_MODEL_TEST=1
|
DEFINES += USE_MODEL_TEST=1
|
||||||
}
|
}
|
||||||
|
|
||||||
include(cdb/cdb.pri)
|
include(cdb/cdb.pri)
|
||||||
include(gdb/gdb.pri)
|
include(gdb/gdb.pri)
|
||||||
include(script/script.pri)
|
include(script/script.pri)
|
||||||
include(tcf/tcf.pri)
|
include(tcf/tcf.pri)
|
||||||
|
|
||||||
include(shared/shared.pri)
|
include(shared/shared.pri)
|
||||||
|
|
||||||
OTHER_FILES += Debugger.pluginspec
|
OTHER_FILES += Debugger.pluginspec
|
||||||
|
2131
src/plugins/debugger/name_demangler.cpp
Normal file
2131
src/plugins/debugger/name_demangler.cpp
Normal file
File diff suppressed because it is too large
Load Diff
72
src/plugins/debugger/name_demangler.h
Normal file
72
src/plugins/debugger/name_demangler.h
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/**************************************************************************
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator
|
||||||
|
**
|
||||||
|
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
**
|
||||||
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||||
|
**
|
||||||
|
** Commercial Usage
|
||||||
|
**
|
||||||
|
** Licensees holding valid Qt Commercial licenses may use this file in
|
||||||
|
** accordance with the Qt Commercial License Agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and Nokia.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
**
|
||||||
|
** Alternatively, 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.
|
||||||
|
**
|
||||||
|
** If you are unsure which license is appropriate for your use, please
|
||||||
|
** contact the sales department at http://qt.nokia.com/contact.
|
||||||
|
**
|
||||||
|
**************************************************************************/
|
||||||
|
|
||||||
|
#ifndef NAME_DEMANGLER_H
|
||||||
|
#define NAME_DEMANGLER_H
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class QString;
|
||||||
|
|
||||||
|
class NameDemanglerPrivate;
|
||||||
|
|
||||||
|
class NameDemangler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NameDemangler();
|
||||||
|
~NameDemangler();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Demangles a mangled name. Also accepts a non-demangled name,
|
||||||
|
* in which case it is not transformed.
|
||||||
|
* Returns true <=> the name is not mangled or it is mangled correctly
|
||||||
|
* according to the specification.
|
||||||
|
*/
|
||||||
|
bool demangle(const QString &mangledName);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A textual description of the error encountered, if there was one.
|
||||||
|
* Only valid if demangle() returned false.
|
||||||
|
*/
|
||||||
|
const QString &errorString() const;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The demangled name. If the original name was not mangled, this
|
||||||
|
* is identical to the input.
|
||||||
|
* Only valid if demangle() returned true.
|
||||||
|
*/
|
||||||
|
const QString &demangledName() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
NameDemanglerPrivate *pImpl;
|
||||||
|
};
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // Include guard.
|
Reference in New Issue
Block a user