2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2009-08-14 13:04:05 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2009-08-14 13:04:05 +02:00
|
|
|
|
2014-02-07 18:10:02 +01:00
|
|
|
#include "debuggerconstants.h"
|
|
|
|
|
|
2021-10-26 10:48:43 +02:00
|
|
|
#include <utils/filepath.h>
|
|
|
|
|
|
2013-03-21 17:10:19 +01:00
|
|
|
#include <QMetaType>
|
2009-08-14 13:04:05 +02:00
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
namespace Debugger::Internal {
|
2009-08-14 13:04:05 +02:00
|
|
|
|
2015-05-27 13:59:56 +02:00
|
|
|
class DebuggerRunParameters;
|
2015-10-08 16:19:57 +02:00
|
|
|
class GdbMi;
|
2015-05-27 13:59:56 +02:00
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
class StackFrame
|
2009-08-14 13:04:05 +02:00
|
|
|
{
|
2010-06-16 11:08:54 +02:00
|
|
|
public:
|
2009-10-02 11:45:19 +02:00
|
|
|
StackFrame();
|
2009-10-16 16:26:28 +02:00
|
|
|
void clear();
|
2009-08-14 13:04:05 +02:00
|
|
|
bool isUsable() const;
|
|
|
|
|
QString toToolTip() const;
|
|
|
|
|
QString toString() const;
|
2015-10-08 16:19:57 +02:00
|
|
|
static StackFrame parseFrame(const GdbMi &data, const DebuggerRunParameters &rp);
|
|
|
|
|
static QList<StackFrame> parseFrames(const GdbMi &data, const DebuggerRunParameters &rp);
|
|
|
|
|
void fixQrcFrame(const DebuggerRunParameters &rp);
|
2009-08-14 13:04:05 +02:00
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
public:
|
2018-07-23 22:28:49 +02:00
|
|
|
DebuggerLanguage language = CppLanguage;
|
2016-06-07 17:04:53 +02:00
|
|
|
QString level;
|
2009-08-14 13:04:05 +02:00
|
|
|
QString function;
|
2021-10-26 10:48:43 +02:00
|
|
|
Utils::FilePath file;// We try to put an absolute file name in there.
|
2015-10-08 16:19:57 +02:00
|
|
|
QString module; // Sometimes something like "/usr/lib/libstdc++.so.6"
|
|
|
|
|
QString receiver; // Used in ScriptEngine only.
|
2018-07-23 22:28:49 +02:00
|
|
|
qint32 line = -1;
|
|
|
|
|
quint64 address = 0;
|
|
|
|
|
bool usable = false;
|
2016-06-07 17:04:53 +02:00
|
|
|
QString context; // Opaque value produced and consumed by the native backends.
|
2009-08-14 13:04:05 +02:00
|
|
|
};
|
|
|
|
|
|
2018-07-23 22:28:49 +02:00
|
|
|
using StackFrames = QList<StackFrame>;
|
2009-10-16 16:26:28 +02:00
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
} // Debugger::Internal
|
2009-08-14 13:04:05 +02:00
|
|
|
|
2010-12-16 11:25:28 +01:00
|
|
|
Q_DECLARE_METATYPE(Debugger::Internal::StackFrame)
|