diff options
author | Keith Seitz <keiths@redhat.com> | 2001-08-11 00:41:02 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2001-08-11 00:41:02 +0000 |
commit | 150c7cbc061880c3386ca4bfecf9aac9eb5ab34a (patch) | |
tree | 1719d965b4621cacfef651c17b3e54caae45929b /gdb/gdb-events.c | |
parent | 943aed2c522375ae5cdcf6425a22b843bdd4bd0b (diff) | |
download | gdb-150c7cbc061880c3386ca4bfecf9aac9eb5ab34a.tar.gz |
* 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.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/gdb-events.c b/gdb/gdb-events.c index d1181088d98..0fbb3bab798 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, |