2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2010-10-15 10:56:39 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2010-10-15 10:56:39 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2010-10-15 10:56:39 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2010-10-15 10:56:39 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2010-12-17 17:14:20 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2010-10-15 10:56:39 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-10-15 10:56:39 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QString>
|
2012-10-19 16:37:57 +02:00
|
|
|
#include <QVector>
|
2010-10-15 10:56:39 +02:00
|
|
|
|
|
|
|
|
namespace Debugger {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2012-10-19 16:37:57 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// ThreadId
|
|
|
|
|
//
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
/*! A typesafe identifier. */
|
|
|
|
|
class ThreadId
|
|
|
|
|
{
|
|
|
|
|
public:
|
2018-07-23 22:28:49 +02:00
|
|
|
ThreadId() = default;
|
2012-10-19 16:37:57 +02:00
|
|
|
explicit ThreadId(qint64 id) : m_id(id) {}
|
|
|
|
|
|
|
|
|
|
bool isValid() const { return m_id != -1; }
|
|
|
|
|
qint64 raw() const { return m_id; }
|
|
|
|
|
bool operator==(const ThreadId other) const { return m_id == other.m_id; }
|
2013-11-14 13:24:02 +01:00
|
|
|
bool operator!=(const ThreadId other) const { return m_id != other.m_id; }
|
2012-10-19 16:37:57 +02:00
|
|
|
|
|
|
|
|
private:
|
2018-07-23 22:28:49 +02:00
|
|
|
qint64 m_id = -1;
|
2012-10-19 16:37:57 +02:00
|
|
|
};
|
|
|
|
|
|
2010-10-15 10:56:39 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// ThreadData
|
|
|
|
|
//
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2012-10-19 16:37:57 +02:00
|
|
|
/*! A structure containing information about a single thread. */
|
2010-10-15 10:56:39 +02:00
|
|
|
struct ThreadData
|
|
|
|
|
{
|
2018-07-23 22:28:49 +02:00
|
|
|
ThreadData() = default;
|
2010-10-15 10:56:39 +02:00
|
|
|
|
|
|
|
|
enum {
|
|
|
|
|
IdColumn,
|
|
|
|
|
AddressColumn,
|
|
|
|
|
FunctionColumn,
|
|
|
|
|
FileColumn,
|
|
|
|
|
LineColumn,
|
|
|
|
|
StateColumn,
|
|
|
|
|
NameColumn,
|
2011-09-01 16:36:27 +02:00
|
|
|
TargetIdColumn,
|
2012-10-16 10:48:44 +02:00
|
|
|
DetailsColumn,
|
2010-10-15 10:56:39 +02:00
|
|
|
CoreColumn,
|
2011-09-01 16:36:27 +02:00
|
|
|
ComboNameColumn,
|
2012-10-19 16:37:57 +02:00
|
|
|
ColumnCount = CoreColumn,
|
|
|
|
|
|
|
|
|
|
IdRole = Qt::UserRole
|
2010-10-15 10:56:39 +02:00
|
|
|
};
|
|
|
|
|
|
2010-11-19 09:39:50 +01:00
|
|
|
// Permanent data.
|
2012-10-19 16:37:57 +02:00
|
|
|
ThreadId id;
|
2016-06-07 17:04:53 +02:00
|
|
|
QString groupId;
|
2010-11-19 09:39:50 +01:00
|
|
|
QString targetId;
|
|
|
|
|
QString core;
|
2018-07-23 22:28:49 +02:00
|
|
|
bool stopped = true;
|
2010-11-19 09:39:50 +01:00
|
|
|
|
|
|
|
|
// State information when stopped.
|
2018-07-23 22:28:49 +02:00
|
|
|
qint32 frameLevel = -1;
|
|
|
|
|
qint32 lineNumber = -1;
|
|
|
|
|
quint64 address = 0;
|
2010-10-15 10:56:39 +02:00
|
|
|
QString function;
|
2011-04-18 15:07:58 +02:00
|
|
|
QString module;
|
2010-10-15 10:56:39 +02:00
|
|
|
QString fileName;
|
2012-10-16 10:48:44 +02:00
|
|
|
QString details;
|
2010-10-15 10:56:39 +02:00
|
|
|
QString state;
|
|
|
|
|
QString name;
|
|
|
|
|
};
|
|
|
|
|
|
2018-07-23 22:28:49 +02:00
|
|
|
using Threads = QVector<ThreadData>;
|
2010-10-15 10:56:39 +02:00
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Debugger
|