aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/stackframe.h
blob: d264fad31925dd423c36fc93a7819b3fdf8be7de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include "debuggerconstants.h"

#include <utils/filepath.h>

#include <QMetaType>

namespace Debugger::Internal {

class DebuggerRunParameters;
class GdbMi;

class StackFrame
{
public:
    StackFrame();
    void clear();
    bool isUsable() const;
    QString toToolTip() const;
    QString toString() const;
    static StackFrame parseFrame(const GdbMi &data, const DebuggerRunParameters &rp);
    static QList<StackFrame> parseFrames(const GdbMi &data, const DebuggerRunParameters &rp);
    void fixQrcFrame(const DebuggerRunParameters &rp);

public:
    DebuggerLanguage language = CppLanguage;
    QString level;
    QString function;
    Utils::FilePath file;// We try to put an absolute file name in there.
    QString module;      // Sometimes something like "/usr/lib/libstdc++.so.6"
    QString receiver;    // Used in ScriptEngine only.
    qint32 line = -1;
    quint64 address = 0;
    bool usable = false;
    QString context;  // Opaque value produced and consumed by the native backends.
};

using StackFrames = QList<StackFrame>;

} // Debugger::Internal

Q_DECLARE_METATYPE(Debugger::Internal::StackFrame)