4
* Copyright 2007 Hamish Rodda <rodda@kde.org>
5
* Copyright 2008 Vladimir Prus <ghost@cs.msu.su>
6
* Copyright 2009 Niko Sams <niko.sams@gmail.com>
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as
10
* published by the Free Software Foundation; either version 2 of the
11
* License, or (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public
19
* License along with this program; if not, write to the
20
* Free Software Foundation, Inc.,
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
#ifndef GDBDEBUGGER_VARIABLECONTROLLER_H
25
#define GDBDEBUGGER_VARIABLECONTROLLER_H
27
#include <debugger/interfaces/ivariablecontroller.h>
29
#include "gdbglobal.h"
31
using namespace KDevelop;
38
namespace GDBDebugger {
43
class VariableController : public KDevelop::IVariableController
48
VariableController(DebugSession* parent);
50
virtual Variable* createVariable(TreeModel* model, TreeItem* parent,
51
const QString& expression,
52
const QString& display = "");
53
virtual QString expressionUnderCursor(KTextEditor::Document* doc, const KTextEditor::Cursor& cursor);
54
virtual void addWatch(KDevelop::Variable* variable);
55
virtual void addWatchpoint(KDevelop::Variable* variable);
56
virtual void update();
59
void programStopped(const GDBMI::ResultRecord &r);
62
DebugSession* debugSession() const;
66
void handleVarUpdate(const GDBMI::ResultRecord& r);
67
void addWatch(const GDBMI::ResultRecord& r);
68
void addWatchpoint(const GDBMI::ResultRecord& r);
70
void handleEvent(IDebugSession::event_t event);
75
#endif // GDBDEBUGGER_VARIABLECONTROLLER_H