~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to debuggers/gdb/variablecontroller.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * GDB Debugger Support
 
3
 *
 
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>
 
7
 *
 
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.
 
12
 *
 
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.
 
17
 *
 
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.
 
22
 */
 
23
 
 
24
#ifndef GDBDEBUGGER_VARIABLECONTROLLER_H
 
25
#define GDBDEBUGGER_VARIABLECONTROLLER_H
 
26
 
 
27
#include <debugger/interfaces/ivariablecontroller.h>
 
28
 
 
29
#include "gdbglobal.h"
 
30
 
 
31
using namespace KDevelop;
 
32
 
 
33
namespace GDBMI {
 
34
class ResultRecord;
 
35
class Value;
 
36
}
 
37
 
 
38
namespace GDBDebugger {
 
39
 
 
40
class GDBController;
 
41
class DebugSession;
 
42
 
 
43
class VariableController : public KDevelop::IVariableController
 
44
{
 
45
    Q_OBJECT
 
46
 
 
47
public:
 
48
    VariableController(DebugSession* parent);
 
49
 
 
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();
 
57
 
 
58
private slots:
 
59
    void programStopped(const GDBMI::ResultRecord &r);
 
60
 
 
61
private:
 
62
    DebugSession* debugSession() const;
 
63
 
 
64
    void updateLocals();
 
65
 
 
66
    void handleVarUpdate(const GDBMI::ResultRecord& r);
 
67
    void addWatch(const GDBMI::ResultRecord& r);
 
68
    void addWatchpoint(const GDBMI::ResultRecord& r);
 
69
 
 
70
    void handleEvent(IDebugSession::event_t event);
 
71
};
 
72
 
 
73
}
 
74
 
 
75
#endif // GDBDEBUGGER_VARIABLECONTROLLER_H