aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2002-08-26 19:41:56 +0000
committerKeith Seitz <keiths@redhat.com>2002-08-26 19:41:56 +0000
commit55970da69c7cafed0c307890835bce67a8a41434 (patch)
tree845f816f424dbbe805633107447f5450e64305ba /gdb
parent1533ce99dd9a44bccb0ca82f534590d62e343a28 (diff)
downloadfsf-binutils-gdb-55970da69c7cafed0c307890835bce67a8a41434.zip
fsf-binutils-gdb-55970da69c7cafed0c307890835bce67a8a41434.tar.gz
fsf-binutils-gdb-55970da69c7cafed0c307890835bce67a8a41434.tar.bz2
* gdb-events.sh: Add selected-frame-level-changed event.
* gdb-events.c: Regenerated. * gdb-events.h: Regenerated.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/gdb-events.c31
-rw-r--r--gdb/gdb-events.h4
-rwxr-xr-xgdb/gdb-events.sh2
4 files changed, 42 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 550b6bb..4bf6a75 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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:
diff --git a/gdb/gdb-events.c b/gdb/gdb-events.c
index 3acccf1..e32d0e4 100644
--- a/gdb/gdb-events.c
+++ b/gdb/gdb-events.c
@@ -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,
diff --git a/gdb/gdb-events.h b/gdb/gdb-events.h
index daba6a4..c3332d7 100644
--- a/gdb/gdb-events.h
+++ b/gdb/gdb-events.h
@@ -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. */
diff --git a/gdb/gdb-events.sh b/gdb/gdb-events.sh
index e92a714..ed3340b 100755
--- a/gdb/gdb-events.sh
+++ b/gdb/gdb-events.sh
@@ -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