aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdb-events.c
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2001-08-11 00:41:02 +0000
committerKeith Seitz <keiths@redhat.com>2001-08-11 00:41:02 +0000
commit67c2c32c6b30dd3690964884a46b39cc6ee27486 (patch)
treeff94c6dfcb0b0766f6bd0d86630c1e45261761be /gdb/gdb-events.c
parentc5745c877823a4c057c1f3a952a2e9fbce69354f (diff)
downloadgdb-67c2c32c6b30dd3690964884a46b39cc6ee27486.zip
gdb-67c2c32c6b30dd3690964884a46b39cc6ee27486.tar.gz
gdb-67c2c32c6b30dd3690964884a46b39cc6ee27486.tar.bz2
* gdb-events.sh: Add architecture_changed event.
* gdbarch.sh: Include gdb-event.h. (gdbarch_update_p): Notify UIs when architecture changes. * gdb-events.h: Regenerated. * gdb-events.c: Regenerated. * gdbarch.c: Regenerated.
Diffstat (limited to 'gdb/gdb-events.c')
-rw-r--r--gdb/gdb-events.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/gdb-events.c b/gdb/gdb-events.c
index d118108..0fbb3ba 100644
--- a/gdb/gdb-events.c
+++ b/gdb/gdb-events.c
@@ -111,6 +111,16 @@ tracepoint_modify_event (int number)
current_event_hooks->tracepoint_modify (number);
}
+void
+architecture_changed_event (void)
+{
+ if (gdb_events_debug)
+ fprintf_unfiltered (gdb_stdlog, "architecture_changed_event\n");
+ if (!current_event_hooks->architecture_changed)
+ return;
+ current_event_hooks->architecture_changed ();
+}
+
#endif
#if WITH_GDB_EVENTS
@@ -134,6 +144,7 @@ enum gdb_event
tracepoint_create,
tracepoint_delete,
tracepoint_modify,
+ architecture_changed,
nr_gdb_events
};
@@ -249,6 +260,14 @@ queue_tracepoint_modify (int number)
append (event);
}
+static void
+queue_architecture_changed (void)
+{
+ struct event *event = XMALLOC (struct event);
+ event->type = architecture_changed;
+ append (event);
+}
+
void
gdb_events_deliver (struct gdb_events *vector)
{
@@ -294,6 +313,9 @@ gdb_events_deliver (struct gdb_events *vector)
vector->tracepoint_modify
(event->data.tracepoint_modify.number);
break;
+ case architecture_changed:
+ vector->architecture_changed ();
+ break;
}
delivering_events = event->next;
xfree (event);
@@ -312,6 +334,7 @@ _initialize_gdb_events (void)
queue_event_hooks.tracepoint_create = queue_tracepoint_create;
queue_event_hooks.tracepoint_delete = queue_tracepoint_delete;
queue_event_hooks.tracepoint_modify = queue_tracepoint_modify;
+ queue_event_hooks.architecture_changed = queue_architecture_changed;
#endif
c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,