29
29
#ifndef _DDD_BreakPoint_h
30
30
#define _DDD_BreakPoint_h
36
32
//-----------------------------------------------------------------------------
37
33
// A `BreakPoint' stores information about an existing debugger breakpoint.
38
34
//-----------------------------------------------------------------------------
45
41
#include "GDBAgent.h"
46
42
#include "StringA.h"
44
// Breakpoint type, respectively:
47
// Tracepoint (as in GDB)
48
// Actionpoint (`when' in DBX, action in Perl)
49
#define BREAKPOINT_TABLE \
50
X(BREAKPOINT,"Breakpoint"), \
51
X(WATCHPOINT,"Watchpoint"), \
52
X(TRACEPOINT,"Tracepoint"), \
53
X(ACTIONPOINT,"Actionpoint")
55
#define BREAKPOINT_TABLE_NOC \
56
X(BREAKPOINT,"Breakpoint") \
57
X(WATCHPOINT,"Watchpoint") \
58
X(TRACEPOINT,"Tracepoint") \
59
X(ACTIONPOINT,"Actionpoint")
50
BREAKPOINT, // Breakpoint
51
WATCHPOINT, // Watchpoint
52
TRACEPOINT, // Tracepoint (as in GDB)
53
ACTIONPOINT // Actionpoint (`when' in DBX, action in Perl)
56
67
// What to do when breakpoint is reached
87
98
Widget mycode_glyph; // Associated glyph in code
90
BreakPoint(const BreakPoint& b)
91
: mynumber(b.mynumber),
94
myenabled(b.myenabled),
95
myfile_name(b.myfile_name),
96
myline_nr(b.myline_nr),
97
myaddress(b.myaddress),
101
myignore_count(b.myignore_count),
102
mycondition(b.mycondition),
103
mycommands(b.mycommands),
105
mywatch_mode(b.mywatch_mode),
106
myenabled_changed(b.myenabled_changed),
107
myfile_changed(b.myfile_changed),
108
myposition_changed(b.myposition_changed),
109
myaddress_changed(b.myaddress_changed),
110
myselected(b.myselected),
111
mysource_glyph(b.mysource_glyph),
112
mycode_glyph(b.mycode_glyph)
116
BreakPoint& operator = (const BreakPoint&)
118
assert(0); return *this;
101
BreakPoint(const BreakPoint&);
102
BreakPoint& operator = (const BreakPoint&);
123
static string false_value();
124
static string and_op();
106
static const string& false_value();
107
static const string& and_op();
125
108
static bool is_false(const string& cond);
110
void process_bash(string& info_output);
111
void process_dbx(string& info_output);
112
void process_dbg(string& info_output);
127
113
void process_gdb(string& info_output);
128
void process_dbx(string& info_output);
129
void process_xdb(string& info_output);
130
114
void process_jdb(string& info_output);
115
void process_perl(string& info_output);
131
116
void process_pydb(string& info_output);
132
void process_perl(string& info_output);
117
void process_xdb(string& info_output);
135
120
// Create new breakpoint from INFO_OUTPUT. ARG denotes the
204
189
// UNDO_COMMANDS contains commands to undo the change.
205
190
// NEED_TOTAL_UNDO is set iff the change requires deleting and
206
191
// setting a new breakpoint.
207
bool update(string& info_output, ostream& undo_commands,
192
bool update(string& info_output, std::ostream& undo_commands,
208
193
bool& need_total_undo);
210
195
// Return commands to restore this breakpoint, using the dummy
212
197
// immediately in order to increase the breakpoint number. If
213
198
// ADDR is set, use ADDR as (fake) address. If COND is set, use
214
199
// COND as (fake) condition. Return true iff successful.
215
bool get_state(ostream& os, int nr, bool as_dummy = false,
200
bool get_state(std::ostream& os, int nr, bool as_dummy = false,
216
201
string addr = "", string cond = char(-1));
218
203
// Stuff for constructing `false' breakpoint conditions