diff options
author | Keith Seitz <keiths@redhat.com> | 2002-09-30 20:06:53 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2002-09-30 20:06:53 +0000 |
commit | f3f306b3b8d186405d0954ec9f7d9709014a6ccf (patch) | |
tree | 8019dc76143e4da4d1a00a75bfea2252de7fe0b3 /gdb/gdb-events.c | |
parent | 5cdd16b2e3257423209ebc5266a362d6c468a7a3 (diff) | |
download | gdb-f3f306b3b8d186405d0954ec9f7d9709014a6ccf.tar.gz |
* gdb-events.sh (selected_thread_changed): New event.
* gdb-events.c: Regenerated.
* gdb-events.h: Regenerated.
Diffstat (limited to 'gdb/gdb-events.c')
-rw-r--r-- | gdb/gdb-events.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gdb/gdb-events.c b/gdb/gdb-events.c index e32d0e49d63..63ee3bc400b 100644 --- a/gdb/gdb-events.c +++ b/gdb/gdb-events.c @@ -139,6 +139,16 @@ selected_frame_level_changed_event (int level) current_event_hooks->selected_frame_level_changed (level); } +void +selected_thread_changed_event (int thread_num) +{ + if (gdb_events_debug) + fprintf_unfiltered (gdb_stdlog, "selected_thread_changed_event\n"); + if (!current_event_hooks->selected_thread_changed) + return; + current_event_hooks->selected_thread_changed (thread_num); +} + #endif #if WITH_GDB_EVENTS @@ -173,6 +183,7 @@ enum gdb_event architecture_changed, target_changed, selected_frame_level_changed, + selected_thread_changed, nr_gdb_events }; @@ -211,6 +222,11 @@ struct selected_frame_level_changed int level; }; +struct selected_thread_changed + { + int thread_num; + }; + struct event { enum gdb_event type; @@ -224,6 +240,7 @@ struct event struct tracepoint_delete tracepoint_delete; struct tracepoint_modify tracepoint_modify; struct selected_frame_level_changed selected_frame_level_changed; + struct selected_thread_changed selected_thread_changed; } data; }; @@ -319,6 +336,15 @@ queue_selected_frame_level_changed (int level) append (event); } +static void +queue_selected_thread_changed (int thread_num) +{ + struct event *event = XMALLOC (struct event); + event->type = selected_thread_changed; + event->data.selected_thread_changed.thread_num = thread_num; + append (event); +} + void gdb_events_deliver (struct gdb_events *vector) { @@ -374,6 +400,10 @@ gdb_events_deliver (struct gdb_events *vector) vector->selected_frame_level_changed (event->data.selected_frame_level_changed.level); break; + case selected_thread_changed: + vector->selected_thread_changed + (event->data.selected_thread_changed.thread_num); + break; } delivering_events = event->next; xfree (event); @@ -395,6 +425,7 @@ _initialize_gdb_events (void) queue_event_hooks.architecture_changed = queue_architecture_changed; queue_event_hooks.target_changed = queue_target_changed; queue_event_hooks.selected_frame_level_changed = queue_selected_frame_level_changed; + queue_event_hooks.selected_thread_changed = queue_selected_thread_changed; #endif c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger, |