* gdb-events.sh: Add selected-frame-level-changed event.
authorKeith Seitz <keiths@redhat.com>
Mon, 26 Aug 2002 19:41:56 +0000 (19:41 +0000)
committerKeith Seitz <keiths@redhat.com>
Mon, 26 Aug 2002 19:41:56 +0000 (19:41 +0000)
        * gdb-events.c: Regenerated.
        * gdb-events.h: Regenerated.

gdb/ChangeLog
gdb/gdb-events.c
gdb/gdb-events.h
gdb/gdb-events.sh

index 550b6bb..4bf6a75 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-26  Keith Seitz  <keiths@redhat.com>
+
+       * gdb-events.sh: Add selected-frame-level-changed event.
+       * gdb-events.c: Regenerated.
+       * gdb-events.h: Regenerated.
+       
 2002-08-26  Stephane Carrez  <stcarrez@nerim.fr>
 
        Fix PR gdb/393:
index 3acccf1..e32d0e4 100644 (file)
@@ -129,6 +129,16 @@ target_changed_event (void)
   current_event_hooks->target_changed ();
 }
 
+void
+selected_frame_level_changed_event (int level)
+{
+  if (gdb_events_debug)
+    fprintf_unfiltered (gdb_stdlog, "selected_frame_level_changed_event\n");
+  if (!current_event_hooks->selected_frame_level_changed)
+    return;
+  current_event_hooks->selected_frame_level_changed (level);
+}
+
 #endif
 
 #if WITH_GDB_EVENTS
@@ -162,6 +172,7 @@ enum gdb_event
   tracepoint_modify,
   architecture_changed,
   target_changed,
+  selected_frame_level_changed,
   nr_gdb_events
 };
 
@@ -195,6 +206,11 @@ struct tracepoint_modify
     int number;
   };
 
+struct selected_frame_level_changed
+  {
+    int level;
+  };
+
 struct event
   {
     enum gdb_event type;
@@ -207,6 +223,7 @@ struct event
        struct tracepoint_create tracepoint_create;
        struct tracepoint_delete tracepoint_delete;
        struct tracepoint_modify tracepoint_modify;
+       struct selected_frame_level_changed selected_frame_level_changed;
       }
     data;
   };
@@ -293,6 +310,15 @@ queue_target_changed (void)
   append (event);
 }
 
+static void
+queue_selected_frame_level_changed (int level)
+{
+  struct event *event = XMALLOC (struct event);
+  event->type = selected_frame_level_changed;
+  event->data.selected_frame_level_changed.level = level;
+  append (event);
+}
+
 void
 gdb_events_deliver (struct gdb_events *vector)
 {
@@ -344,6 +370,10 @@ gdb_events_deliver (struct gdb_events *vector)
        case target_changed:
          vector->target_changed ();
          break;
+       case selected_frame_level_changed:
+         vector->selected_frame_level_changed
+           (event->data.selected_frame_level_changed.level);
+         break;
        }
       delivering_events = event->next;
       xfree (event);
@@ -364,6 +394,7 @@ _initialize_gdb_events (void)
   queue_event_hooks.tracepoint_modify = queue_tracepoint_modify;
   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;
 #endif
 
   c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
index daba6a4..c3332d7 100644 (file)
@@ -60,6 +60,7 @@ typedef void (gdb_events_tracepoint_delete_ftype) (int number);
 typedef void (gdb_events_tracepoint_modify_ftype) (int number);
 typedef void (gdb_events_architecture_changed_ftype) (void);
 typedef void (gdb_events_target_changed_ftype) (void);
+typedef void (gdb_events_selected_frame_level_changed_ftype) (int level);
 
 
 /* gdb-events: object. */
@@ -74,6 +75,7 @@ struct gdb_events
     gdb_events_tracepoint_modify_ftype *tracepoint_modify;
     gdb_events_architecture_changed_ftype *architecture_changed;
     gdb_events_target_changed_ftype *target_changed;
+    gdb_events_selected_frame_level_changed_ftype *selected_frame_level_changed;
   };
 
 
@@ -88,6 +90,7 @@ extern void tracepoint_delete_event (int number);
 extern void tracepoint_modify_event (int number);
 extern void architecture_changed_event (void);
 extern void target_changed_event (void);
+extern void selected_frame_level_changed_event (int level);
 
 
 /* When GDB_EVENTS are not being used, completly disable them. */
@@ -101,6 +104,7 @@ extern void target_changed_event (void);
 #define tracepoint_modify_event(number) 0
 #define architecture_changed_event() 0
 #define target_changed_event() 0
+#define selected_frame_level_changed_event(level) 0
 #endif
 
 /* Install custom gdb-events hooks. */
index e92a714..ed3340b 100755 (executable)
@@ -66,6 +66,7 @@ f:void:tracepoint_delete:int number:number
 f:void:tracepoint_modify:int number:number
 f:void:architecture_changed:void
 f:void:target_changed:void
+f:void:selected_frame_level_changed:int level:level
 #*:void:annotate_starting_hook:void
 #*:void:annotate_stopped_hook:void
 #*:void:annotate_signalled_hook:void
@@ -88,7 +89,6 @@ f:void:target_changed:void
 #*:void:readline_begin_hook:char *format, ...:format
 #*:char *:readline_hook:char *prompt:prompt
 #*:void:readline_end_hook:void
-#*:void:context_hook:int num:num
 #*:int:target_wait_hook:int pid, struct target_waitstatus *status:pid, status
 #*:void:call_command_hook:struct cmd_list_element *c, char *cmd, int from_tty:c, cmd, from_tty
 #*:NORETURN void:error_hook:void:: ATTR_NORETURN