File indexing completed on 2024-05-12 04:40:07

0001 /*
0002     SPDX-FileCopyrightText: 2016 Aetf <aetf@unlimitedcodeworks.xyz>
0003 
0004     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #ifndef LLDB_VARIABLE_H
0008 #define LLDB_VARIABLE_H
0009 
0010 #include "mivariable.h"
0011 
0012 namespace KDevelop {
0013 class TreeModel;
0014 class TreeItem;
0015 }
0016 
0017 namespace KDevMI { namespace LLDB {
0018 class DebugSession;
0019 class LldbVariable : public MIVariable
0020 {
0021     Q_OBJECT
0022 
0023 public:
0024     LldbVariable(DebugSession *session, KDevelop::TreeModel* model, KDevelop::TreeItem* parent,
0025                 const QString& expression, const QString& display = QString());
0026 
0027     void handleRawUpdate(const MI::ResultRecord &r);
0028 
0029     void refetch();
0030 
0031     using KDevelop::Variable::topLevel;
0032 
0033     // For testing
0034     using KDevelop::Variable::childCount;
0035     using KDevelop::Variable::child;
0036 
0037 protected:
0038     void formatChanged() override;
0039     QString formatValue(const QString &value) const override;
0040 };
0041 
0042 } // end of namespace LLDB
0043 } // end of namespace KDevMI
0044 
0045 #endif // LLDB_VARIABLE_H