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 | 28ee05e92474f1a72e289ff06050351938b8f807 (patch) | |
tree | 11f71f07682f031868016526062aa5abd2ecc403 /gdb/gdb-events.c | |
parent | 6eecb1c8dd27952c745d2ebb4478c0d7d1feed8b (diff) | |
download | gdb-28ee05e92474f1a72e289ff06050351938b8f807.zip gdb-28ee05e92474f1a72e289ff06050351938b8f807.tar.gz gdb-28ee05e92474f1a72e289ff06050351938b8f807.tar.bz2 |
* 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 e32d0e4..63ee3bc 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, |