diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-03-25 13:42:47 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-03-25 13:42:47 +0100 |
commit | ad5a0010582eff3ba05932bebffadcc90eb8c38f (patch) | |
tree | 29c9b320bc18093d9f56c9a5c366b0c220f02ca1 /src/plugins/debugger/watchutils.h | |
parent | 05587f1f562a538ce2385625c03c970a8d54e686 (diff) | |
download | qt-creator-ad5a0010582eff3ba05932bebffadcc90eb8c38f.tar.gz |
Factor out common debugger watch functionality
Factor out watch function, improve debug output.
Diffstat (limited to 'src/plugins/debugger/watchutils.h')
-rw-r--r-- | src/plugins/debugger/watchutils.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/plugins/debugger/watchutils.h b/src/plugins/debugger/watchutils.h new file mode 100644 index 0000000000..6c7dbb9143 --- /dev/null +++ b/src/plugins/debugger/watchutils.h @@ -0,0 +1,70 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Qt Software Information (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 qt-sales@nokia.com. +** +**************************************************************************/ + +#ifndef WATCHUTILS_H +#define WATCHUTILS_H + +#include <QtCore/QString> + +QT_BEGIN_NAMESPACE +class QString; +QT_END_NAMESPACE + +namespace Debugger { +namespace Internal { + +QString dotEscape(QString str); +QString currentTime(); +bool isSkippableFunction(const QString &funcName, const QString &fileName); +bool isLeavableFunction(const QString &funcName, const QString &fileName); + +inline bool isNameChar(char c) +{ + // could be 'stopped' or 'shlibs-added' + return (c >= 'a' && c <= 'z') || c == '-'; +} + +bool hasLetterOrNumber(const QString &exp); +bool hasSideEffects(const QString &exp); +bool isKeyWord(const QString &exp); +bool isPointerType(const QString &type); +bool isAccessSpecifier(const QString &str); +bool startsWithDigit(const QString &str); +QString stripPointerType(QString type); +QString gdbQuoteTypes(const QString &type); +bool extractTemplate(const QString &type, QString *tmplate, QString *inner); +QString extractTypeFromPTypeOutput(const QString &str); +bool isIntOrFloatType(const QString &type); +QString sizeofTypeExpression(const QString &type); + + +} // namespace Internal +} // namespace Debugger + +#endif // WATCHUTILS_H |