* gdb-events.sh: Add architecture_changed event.
* gdbarch.sh: Include gdb-event.h. (gdbarch_update_p): Notify UIs when architecture changes. * gdb-events.h: Regenerated. * gdb-events.c: Regenerated. * gdbarch.c: Regenerated.
This commit is contained in:
parent
c5745c8778
commit
67c2c32c6b
6 changed files with 45 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
|||
2001-08-10 Keith Seitz <keiths@redhat.com>
|
||||
|
||||
* gdb-events.sh: Add architecture_changed event.
|
||||
* gdbarch.sh: Include gdb-event.h.
|
||||
(gdbarch_update_p): Notify UIs when architecture changes.
|
||||
* gdb-events.h: Regenerated.
|
||||
* gdb-events.c: Regenerated.
|
||||
* gdbarch.c: Regenerated.
|
||||
|
||||
2001-08-10 Michael Snyder <msnyder@redhat.com>
|
||||
|
||||
* regcache.c (legacy_write_register_gen): Don't 'optimize out'
|
||||
|
|
|
@ -111,6 +111,16 @@ tracepoint_modify_event (int number)
|
|||
current_event_hooks->tracepoint_modify (number);
|
||||
}
|
||||
|
||||
void
|
||||
architecture_changed_event (void)
|
||||
{
|
||||
if (gdb_events_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "architecture_changed_event\n");
|
||||
if (!current_event_hooks->architecture_changed)
|
||||
return;
|
||||
current_event_hooks->architecture_changed ();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if WITH_GDB_EVENTS
|
||||
|
@ -134,6 +144,7 @@ enum gdb_event
|
|||
tracepoint_create,
|
||||
tracepoint_delete,
|
||||
tracepoint_modify,
|
||||
architecture_changed,
|
||||
nr_gdb_events
|
||||
};
|
||||
|
||||
|
@ -249,6 +260,14 @@ queue_tracepoint_modify (int number)
|
|||
append (event);
|
||||
}
|
||||
|
||||
static void
|
||||
queue_architecture_changed (void)
|
||||
{
|
||||
struct event *event = XMALLOC (struct event);
|
||||
event->type = architecture_changed;
|
||||
append (event);
|
||||
}
|
||||
|
||||
void
|
||||
gdb_events_deliver (struct gdb_events *vector)
|
||||
{
|
||||
|
@ -294,6 +313,9 @@ gdb_events_deliver (struct gdb_events *vector)
|
|||
vector->tracepoint_modify
|
||||
(event->data.tracepoint_modify.number);
|
||||
break;
|
||||
case architecture_changed:
|
||||
vector->architecture_changed ();
|
||||
break;
|
||||
}
|
||||
delivering_events = event->next;
|
||||
xfree (event);
|
||||
|
@ -312,6 +334,7 @@ _initialize_gdb_events (void)
|
|||
queue_event_hooks.tracepoint_create = queue_tracepoint_create;
|
||||
queue_event_hooks.tracepoint_delete = queue_tracepoint_delete;
|
||||
queue_event_hooks.tracepoint_modify = queue_tracepoint_modify;
|
||||
queue_event_hooks.architecture_changed = queue_architecture_changed;
|
||||
#endif
|
||||
|
||||
c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
|
||||
|
|
|
@ -57,6 +57,7 @@ typedef void (gdb_events_breakpoint_modify_ftype) (int b);
|
|||
typedef void (gdb_events_tracepoint_create_ftype) (int number);
|
||||
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);
|
||||
|
||||
|
||||
/* gdb-events: object. */
|
||||
|
@ -69,6 +70,7 @@ struct gdb_events
|
|||
gdb_events_tracepoint_create_ftype *tracepoint_create;
|
||||
gdb_events_tracepoint_delete_ftype *tracepoint_delete;
|
||||
gdb_events_tracepoint_modify_ftype *tracepoint_modify;
|
||||
gdb_events_architecture_changed_ftype *architecture_changed;
|
||||
};
|
||||
|
||||
|
||||
|
@ -81,6 +83,7 @@ extern void breakpoint_modify_event (int b);
|
|||
extern void tracepoint_create_event (int number);
|
||||
extern void tracepoint_delete_event (int number);
|
||||
extern void tracepoint_modify_event (int number);
|
||||
extern void architecture_changed_event (void);
|
||||
|
||||
|
||||
/* When GDB_EVENTS are not being used, completly disable them. */
|
||||
|
@ -92,6 +95,7 @@ extern void tracepoint_modify_event (int number);
|
|||
#define tracepoint_create_event(number) 0
|
||||
#define tracepoint_delete_event(number) 0
|
||||
#define tracepoint_modify_event(number) 0
|
||||
#define architecture_changed_event() 0
|
||||
#endif
|
||||
|
||||
/* Install custom gdb-events hooks. */
|
||||
|
|
|
@ -64,6 +64,7 @@ f:void:breakpoint_modify:int b:b
|
|||
f:void:tracepoint_create:int number:number
|
||||
f:void:tracepoint_delete:int number:number
|
||||
f:void:tracepoint_modify:int number:number
|
||||
f:void:architecture_changed:void
|
||||
#*:void:annotate_starting_hook:void
|
||||
#*:void:annotate_stopped_hook:void
|
||||
#*:void:annotate_signalled_hook:void
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#include "floatformat.h"
|
||||
|
||||
#include "gdb_assert.h"
|
||||
#include "gdb-events.h"
|
||||
|
||||
/* Static function declarations */
|
||||
|
||||
|
@ -4733,6 +4734,7 @@ gdbarch_update_p (struct gdbarch_info info)
|
|||
new_gdbarch->bfd_arch_info->printable_name);
|
||||
current_gdbarch = new_gdbarch;
|
||||
swapin_gdbarch_swap (new_gdbarch);
|
||||
architecture_changed_event ();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -4766,6 +4768,7 @@ gdbarch_update_p (struct gdbarch_info info)
|
|||
registered an interest in this architecture. CURRENT_GDBARCH
|
||||
must be updated before these modules are called. */
|
||||
init_gdbarch_data (new_gdbarch);
|
||||
architecture_changed_event ();
|
||||
|
||||
if (gdbarch_debug)
|
||||
gdbarch_dump (current_gdbarch, gdb_stdlog);
|
||||
|
|
|
@ -1129,6 +1129,7 @@ cat <<EOF
|
|||
#include "floatformat.h"
|
||||
|
||||
#include "gdb_assert.h"
|
||||
#include "gdb-events.h"
|
||||
|
||||
/* Static function declarations */
|
||||
|
||||
|
@ -2066,6 +2067,7 @@ gdbarch_update_p (struct gdbarch_info info)
|
|||
new_gdbarch->bfd_arch_info->printable_name);
|
||||
current_gdbarch = new_gdbarch;
|
||||
swapin_gdbarch_swap (new_gdbarch);
|
||||
architecture_changed_event ();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -2099,6 +2101,7 @@ gdbarch_update_p (struct gdbarch_info info)
|
|||
registered an interest in this architecture. CURRENT_GDBARCH
|
||||
must be updated before these modules are called. */
|
||||
init_gdbarch_data (new_gdbarch);
|
||||
architecture_changed_event ();
|
||||
|
||||
if (gdbarch_debug)
|
||||
gdbarch_dump (current_gdbarch, gdb_stdlog);
|
||||
|
|
Loading…
Reference in a new issue