URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [insight/] [gdb/] [gdbtcl/] [ehandler.itb] - Blame information for rev 578
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
578 |
markom |
# GDBEventHandler class implementation 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 |
|
|
# ------------------------------------------------------------
|
15 |
|
|
# PUBLIC PROC: dispatch - Dispatch the given event to all
|
16 |
|
|
# event handlers. The name of the handler
|
17 |
|
|
# method to call is stored in the event's
|
18 |
|
|
# "handler" method.
|
19 |
|
|
# ------------------------------------------------------------
|
20 |
|
|
body GDBEventHandler::dispatch {event} {
|
21 |
|
|
|
22 |
|
|
set handler [$event handler]
|
23 |
|
|
|
24 |
|
|
# invoke event handlers
|
25 |
|
|
foreach w [itcl_info objects -isa GDBEventHandler] {
|
26 |
|
|
dbug I "posting event \"$handler\" to \"$w\""
|
27 |
|
|
if {[catch {$w $handler $event}]} {
|
28 |
|
|
dbug E "On $handler event, $w errored:\n$::errorInfo"
|
29 |
|
|
}
|
30 |
|
|
}
|
31 |
|
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.