* gdb-events.c: Regenerated.
* gdb-events.c: Regenerated.
* valops.c (value_assign): Add target-changed event notification
to inlval_register, lval_memory, and lval_reg_frame_relative.
+2002-08-21 Keith Seitz <keiths@redhat.com>
+
+ * gdb-events.sh: Add target-changed event.
+ * gdb-events.c: Regenerated.
+ * gdb-events.c: Regenerated.
+ * valops.c (value_assign): Add target-changed event notification
+ to inlval_register, lval_memory, and lval_reg_frame_relative.
+
2002-08-21 Joel Brobecker <brobecker@gnat.com>
* NEWS: Add an entry regarding the improvement of the next/step
current_event_hooks->architecture_changed ();
}
+void
+target_changed_event (void)
+{
+ if (gdb_events_debug)
+ fprintf_unfiltered (gdb_stdlog, "target_changed_event\n");
+ if (!current_event_hooks->target_changed)
+ return;
+ current_event_hooks->target_changed ();
+}
+
#endif
#if WITH_GDB_EVENTS
tracepoint_delete,
tracepoint_modify,
architecture_changed,
+ target_changed,
nr_gdb_events
};
append (event);
}
+static void
+queue_target_changed (void)
+{
+ struct event *event = XMALLOC (struct event);
+ event->type = target_changed;
+ append (event);
+}
+
void
gdb_events_deliver (struct gdb_events *vector)
{
case architecture_changed:
vector->architecture_changed ();
break;
+ case target_changed:
+ vector->target_changed ();
+ break;
}
delivering_events = event->next;
xfree (event);
queue_event_hooks.tracepoint_delete = queue_tracepoint_delete;
queue_event_hooks.tracepoint_modify = queue_tracepoint_modify;
queue_event_hooks.architecture_changed = queue_architecture_changed;
+ queue_event_hooks.target_changed = queue_target_changed;
#endif
c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
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);
/* gdb-events: object. */
gdb_events_tracepoint_delete_ftype *tracepoint_delete;
gdb_events_tracepoint_modify_ftype *tracepoint_modify;
gdb_events_architecture_changed_ftype *architecture_changed;
+ gdb_events_target_changed_ftype *target_changed;
};
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);
/* When GDB_EVENTS are not being used, completly disable them. */
#define tracepoint_delete_event(number) 0
#define tracepoint_modify_event(number) 0
#define architecture_changed_event() 0
+#define target_changed_event() 0
#endif
/* Install custom gdb-events hooks. */
f:void:tracepoint_delete:int number:number
f:void:tracepoint_modify:int number:number
f:void:architecture_changed:void
+f:void:target_changed:void
#*:void:annotate_starting_hook:void
#*:void:annotate_stopped_hook:void
#*:void:annotate_signalled_hook:void
#*:void:readline_begin_hook:char *format, ...:format
#*:char *:readline_hook:char *prompt:prompt
#*:void:readline_end_hook:void
-#*:void:register_changed_hook:int regno:regno
-#*:void:memory_changed_hook:CORE_ADDR addr, int len:addr, len
#*: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
write_memory (changed_addr, dest_buffer, changed_len);
if (memory_changed_hook)
memory_changed_hook (changed_addr, changed_len);
+ target_changed_event ();
}
break;
VALUE_CONTENTS (fromval), TYPE_LENGTH (type));
#endif
}
+
+ target_changed_event ();
+
/* Assigning to the stack pointer, frame pointer, and other
(architecture and calling convention specific) registers may
cause the frame cache to be out of date. We just do this
if (register_changed_hook)
register_changed_hook (-1);
+ target_changed_event ();
}
break;