From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Keith Seitz Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] Architecture change events Date: Fri, 10 Aug 2001 16:48:00 -0000 Message-id: <3B7472AD.3040702@cygnus.com> References: X-SW-Source: 2001-08/msg00118.html > On Fri, 10 Aug 2001, Andrew Cagney wrote: > > >> For the moment, I'd ignore the thread. GDB is still very single-thread >> single-frame bug-eyed. That event will just notify you that the single >> global architecture was changed. I think interpreting it differently >> would be dangerous. > > > Ok. Then I shall turn this into an RFA.. (I'll whack the "/*thread??*/" > stuff.) Ok. Andrew >> > ChangeLog >> > 2001-08-10 Keith Seitz >> > >> > * 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. >> > >> > Almost complete patch (notice missing thread argument) >> > Index: gdb-events.sh >> > =================================================================== >> > RCS file: /cvs/src/src/gdb/gdb-events.sh,v >> > retrieving revision 1.10 >> > diff -u -p -r1.10 gdb-events.sh >> > --- gdb-events.sh 2001/08/10 16:05:30 1.10 >> > +++ gdb-events.sh 2001/08/10 20:40:03 >> > @@ -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 >> > Index: gdbarch.sh >> > =================================================================== >> > RCS file: /cvs/src/src/gdb/gdbarch.sh,v >> > retrieving revision 1.73 >> > diff -u -p -r1.73 gdbarch.sh >> > --- gdbarch.sh 2001/07/10 21:24:48 1.73 >> > +++ gdbarch.sh 2001/08/10 20:40:04 >> > @@ -1129,6 +1129,7 @@ cat <> > #include "floatformat.h" >> > >> > #include "gdb_assert.h" >> > +#include "gdb-events.h" >> > >> > /* Static function declarations */ >> > >> > @@ -2066,6 +2067,7 @@ gdbarch_update_p (struct gdbarch_info in >> > new_gdbarch->bfd_arch_info->printable_name); >> > current_gdbarch = new_gdbarch; >> > swapin_gdbarch_swap (new_gdbarch); >> > + architecture_changed_event (/*thread??*/); >> > return 1; >> > } >> > } >> > @@ -2099,7 +2101,8 @@ gdbarch_update_p (struct gdbarch_info in >> > registered an interest in this architecture. CURRENT_GDBARCH >> > must be updated before these modules are called. */ >> > init_gdbarch_data (new_gdbarch); >> > - >> > + architecture_changed_event (/*thread??*/); >> > + >> > if (gdbarch_debug) >> > gdbarch_dump (current_gdbarch, gdb_stdlog); >> > >> > >> > >> > > >> >> >> >