OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [gdbtcl/] [gdbevent.ith] - Blame information for rev 1767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
# GDBEvent class definitions for Insight.
2
# Copyright 2001 Red Hat, Inc.
3
#
4
# This program is free software; you can redistribute it and/or modify it
5
# under the terms of the GNU General Public License (GPL) as published by
6
# the Free Software Foundation; either version 2 of the License, or (at
7
# your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
 
14
# For reasons unknown to me, I cannot put any of the constructors
15
# in the implementation files. The very first instance of the class
16
# will call the (empty) constructor in here instead of the one
17
# defined in the implementation file. Sigh.
18
 
19
class GDBEvent {
20
  public method get {what} { return "" }
21
  public method handler {} { return "unknown" }
22
}
23
 
24
# BREAKPOINT EVENT
25
#
26
# This event is created/dispatched whenever a breakpoint is created,
27
# deleted, or modified.
28
#
29
# action ....... what type of BP event ("create", "delete", "modify")
30
# number ....... gdb's internal token for the BP
31
# file ......... filename in which event occurred
32
# function ..... function in which event occurred
33
# line ......... line number in file
34
# address ...... address of BP
35
# type ......... breakpoint type ("breakpoint", "hw breakpoint", "step resume", etc)
36
# enabled ...... BP enabled?
37
# disposition .. BP's disposition ("delete", "delstop", "disable", "donttouch")
38
# ignore_count . BP's ignore count
39
# commands ..... list of commands to run when BP hit
40
# condition .... BP condition
41
# thread ....... thread in which BP is set (or -1 for all threads)
42
# hit_count .... number of times BP has been hit
43
# user_specification
44
#             .. text the user initially used to set this breakpoint
45
class BreakpointEvent {
46
  inherit GDBEvent
47
 
48
  public variable action {}
49
  public variable number {}
50
 
51
  #constructor {args} {}
52
  constructor {args} {
53
    eval configure $args
54
 
55
    # If creating/modifying a breakpoint, then get
56
    # all info about it and save it away.
57
    _init
58
  }
59
  #destructor { dbug I "" }
60
 
61
  public method get {what}
62
  public method handler {} { return "breakpoint" }
63
 
64
  private variable _file         {}
65
  private variable _function     {}
66
  private variable _line         {}
67
  private variable _address      {}
68
  private variable _type         {}
69
  private variable _enabled      {}
70
  private variable _disposition  {}
71
  private variable _ignore_count {}
72
  private variable _commands     {}
73
  private variable _condition    {}
74
  private variable _thread       {}
75
  private variable _hit_count    {}
76
  private variable _user_specification {}
77
 
78
  private method _init {}
79
}
80
 
81
# TRACEPOINT EVENT
82
#
83
# This event is created/dispatched whenever a tracepoint is created,
84
# deleted, or modified.
85
#
86
# action ....... what type of BP event ("create", "delete", "modify")
87
# number ....... gdb's internal token for the BP
88
# file ......... filename in which event occurred
89
# function ..... function in which event occurred
90
# line ......... line number in file
91
# address ...... address of BP
92
# enabled ...... BP enabled?
93
# pass_count ...
94
# step_count ...
95
# thread ....... thread in which BP is set (or -1 for all threads)
96
# hit_count .... number of times BP has been hit
97
# actions ...... a list of actions to be performed when the tracepoint is hit
98
class TracepointEvent {
99
  inherit GDBEvent
100
 
101
  public variable action {}
102
  public variable number {}
103
 
104
  # For reasons unknown to me, I cannot put this in the implementation
105
  # file. The very first instance of the class will call this empty
106
  # constructor instead of the one defined in the implementation file.
107
  #constructor {args} {}
108
  constructor {args} {
109
    eval configure $args
110
 
111
    # If creating/modifying a tracepoint, then get
112
    # all info about it and save it away.
113
    _init
114
  }
115
  #destructor { dbug I "" }
116
  public method get {what}
117
  public method handler {} { return "tracepoint" }
118
 
119
  private variable _file       {}
120
  private variable _function   {}
121
  private variable _line       {}
122
  private variable _address    {}
123
  private variable _enabled    {}
124
  private variable _pass_count {}
125
  private variable _step_count {}
126
  private variable _thread     {}
127
  private variable _hit_count  {}
128
  private variable _actions    {}
129
 
130
  private method _init {}
131
}
132
 
133
# SET VARIABLE EVENT
134
#
135
# This event is created/dispatched whenever a "set" command successfully
136
# completes in gdb's command interpreter.
137
#
138
# variable ..... the variable that was changed
139
# value ........ the variable's new value
140
class SetVariableEvent {
141
  inherit GDBEvent
142
 
143
  public variable variable
144
  public variable value
145
 
146
  constructor {args} {
147
    eval configure $args
148
  }
149
  #destructor { dbug I "" }
150
  public method get {what}
151
  public method handler {} { return "set_variable" }
152
}
153
 
154
# BUSY EVENT
155
#
156
# This event is created/dispatched whenever the GUI or GDB is "busy".
157
# This could happen when the inferior is executing or when the GUI
158
# is, for example, fetching memory from the target.
159
 
160
class BusyEvent {
161
  inherit GDBEvent
162
 
163
  public method handler {} { return "busy" }
164
}
165
 
166
# IDLE EVENT
167
#
168
# This event is created/dispatched whenever the GUI and GDB is not
169
# "busy". Receipt of this event means that the GUI should be put into
170
# a state to accept input by the user.
171
 
172
class IdleEvent {
173
  inherit GDBEvent
174
 
175
  public method handler {} { return "idle" }
176
}
177
 
178
# UPDATE EVENT
179
#
180
# This event is created/dispatched whenever the target's state
181
# has changed. When an UpdateEvent is received, widgets should
182
# update their contents to reflect the inferior's new state.
183
#
184
# Right now, this just holds the output of gdb_loc...
185
#
186
# compile_filename - Filename stored in the symtab
187
# full_filename    - Full filename of file, if found in source search dir
188
# function         - Function name
189
# line             - Line number
190
# frame_pc         - Frame's PC
191
# pc               - Real stop PC
192
# shlib            - Shared library stopped in
193
#
194
# FIXME: Should probably put frame_pc and pc into different
195
# types of update events...
196
class UpdateEvent {
197
  inherit GDBEvent
198
 
199
  constructor {args} {}
200
  public method get {what}
201
  public method handler {} { return "update" }
202
 
203
  private variable _compile_filename {}
204
  private variable _function         {}
205
  private variable _full_filename    {}
206
  private variable _line             {}
207
  private variable _frame_pc         {}
208
  private variable _pc               {}
209
  private variable _shlib            {}
210
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.