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

« back to all changes in this revision

Viewing changes to languages/cpp/debugger/gdbcommand.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2006-05-23 18:39:42 UTC
  • Revision ID: james.westby@ubuntu.com-20060523183942-hucifbvh68k2bwz7
Tags: upstream-3.3.2
Import upstream version 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
    begin                : Sun Aug 8 1999
 
3
    copyright            : (C) 1999 by John Birch
 
4
    email                : jbb@kdevelop.org
 
5
 ***************************************************************************/
 
6
 
 
7
/***************************************************************************
 
8
 *                                                                         *
 
9
 *   This program is free software; you can redistribute it and/or modify  *
 
10
 *   it under the terms of the GNU General Public License as published by  *
 
11
 *   the Free Software Foundation; either version 2 of the License, or     *
 
12
 *   (at your option) any later version.                                   *
 
13
 *                                                                         *
 
14
 ***************************************************************************/
 
15
 
 
16
#ifndef _GDBCOMMAND_H_
 
17
#define _GDBCOMMAND_H_
 
18
 
 
19
#include "dbgcommand.h"
 
20
 
 
21
namespace GDBDebugger
 
22
{
 
23
 
 
24
class Breakpoint;
 
25
class VarItem;
 
26
 
 
27
// sigh - namespace's don't work on some of the older compilers
 
28
enum GDBCmd
 
29
{
 
30
  BLOCK_START     = '\32',
 
31
  SRC_POSITION    = '\32',    // Hmmm, same value may not work for all compilers
 
32
 
 
33
  ARGS            = 'A',
 
34
 
 
35
  BPLIST          = 'B',
 
36
  SET_BREAKPT     = 'b',
 
37
 
 
38
  DATAREQUEST     = 'D',
 
39
  DISASSEMBLE     = 'd',
 
40
 
 
41
  FRAME           = 'F',
 
42
  FILE_START      = 'f',
 
43
 
 
44
  INITIALISE      = 'I',
 
45
  IDLE            = 'i',
 
46
 
 
47
  BACKTRACE       = 'K',
 
48
 
 
49
  LOCALS          = 'L',
 
50
  LIBRARIES       = 'l',
 
51
 
 
52
  MEMDUMP         = 'M',
 
53
 
 
54
  TRACING_PRINTF  = 'P',
 
55
 
 
56
  RUN             = 'R',
 
57
  REGISTERS       = 'r',
 
58
 
 
59
  PROGRAM_STOP    = 'S',
 
60
  SHARED_CONT     = 's',
 
61
 
 
62
  INFOTHREAD      = 'T',
 
63
  SWITCHTHREAD    = 't',
 
64
 
 
65
  USERCMD         = 'U',
 
66
 
 
67
  SETWATCH        = 'W',
 
68
  UNSETWATCH      = 'w',
 
69
 
 
70
  DETACH          = 'z',
 
71
 
 
72
  WAIT            = '0',
 
73
 
 
74
  WHATIS          = 'H',
 
75
 
 
76
  SETVALUE        = 'V'
 
77
  
 
78
};
 
79
 
 
80
#define RUNCMD      (true)
 
81
#define NOTRUNCMD   (false)
 
82
#define INFOCMD     (true)
 
83
#define NOTINFOCMD  (false)
 
84
 
 
85
/**
 
86
 * @author John Birch
 
87
 */
 
88
 
 
89
class GDBCommand : public DbgCommand
 
90
{
 
91
public:
 
92
    GDBCommand(const QCString& command, bool isRunCmd=false, bool isInfoCmd=true,
 
93
               char prompt=WAIT);
 
94
    virtual ~GDBCommand();
 
95
 
 
96
private:
 
97
    static QCString idlePrompt_;
 
98
};
 
99
 
 
100
/***************************************************************************/
 
101
/***************************************************************************/
 
102
/***************************************************************************/
 
103
class GDBItemCommand : public GDBCommand
 
104
{
 
105
public:
 
106
    GDBItemCommand(VarItem *item, const QCString &command,
 
107
                   bool isRunCmd=false, char prompt=DATAREQUEST);
 
108
    virtual ~GDBItemCommand();
 
109
 
 
110
    VarItem *getItem()      { return item_; }
 
111
 
 
112
private:
 
113
    VarItem *item_;
 
114
};
 
115
 
 
116
/***************************************************************************/
 
117
/***************************************************************************/
 
118
/***************************************************************************/
 
119
//class GDBReferenceCommand : public GDBItemCommand
 
120
//{
 
121
//public:
 
122
//  GDBReferenceCommand(VarItem* item);
 
123
//      virtual ~GDBReferenceCommand();
 
124
//};
 
125
 
 
126
/***************************************************************************/
 
127
/***************************************************************************/
 
128
/***************************************************************************/
 
129
class GDBSetBreakpointCommand : public GDBCommand
 
130
{
 
131
public:
 
132
    GDBSetBreakpointCommand(const QCString& setCommand, const Breakpoint* bp);
 
133
    virtual ~GDBSetBreakpointCommand();
 
134
 
 
135
    const Breakpoint* breakpoint() const        { return bp_; }
 
136
 
 
137
private:
 
138
    const Breakpoint* bp_;
 
139
};
 
140
 
 
141
/***************************************************************************/
 
142
/***************************************************************************/
 
143
/***************************************************************************/
 
144
 
 
145
}
 
146
 
 
147
#endif