Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] Architecture change events
@ 2001-08-10 13:50 Keith Seitz
  2001-08-10 14:06 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Keith Seitz @ 2001-08-10 13:50 UTC (permalink / raw)
  To: gdb-patches

Hi,

I would like some advice for how to complete this patch for submission
into the repository.

The patch simply adds an "architecture_changed" event and notification.
Problem: we need to pass a thread id around with this, but my
understanding of gdb in this area is a little deficient. It's been a long
time.

So, how do I go about figuring out what thread id to pass along with this?
(Is there even a way to do this yet?)

I dunno. Help!
Keith

Here's what I'm looking at:

ChangeLog
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.

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 <<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 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);



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] Architecture change events
  2001-08-10 13:50 [RFC] Architecture change events Keith Seitz
@ 2001-08-10 14:06 ` Andrew Cagney
  2001-08-10 14:23   ` Keith Seitz
  2001-08-10 17:41   ` Keith Seitz
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cagney @ 2001-08-10 14:06 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches

> Hi,
> 
> I would like some advice for how to complete this patch for submission
> into the repository.
> 
> The patch simply adds an "architecture_changed" event and notification.
> Problem: we need to pass a thread id around with this, but my
> understanding of gdb in this area is a little deficient. It's been a long
> time.
> 
> So, how do I go about figuring out what thread id to pass along with this?
> (Is there even a way to do this yet?)


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.

Just expect, down the track, to get increasingly specific events: `int 
thread` then even later `int thread, int frame`.

	Andrew


> I dunno. Help!
> Keith
> 
> Here's what I'm looking at:
> 
> ChangeLog
> 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.
> 
> 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 <<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 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);
> 
> 
> 
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] Architecture change events
  2001-08-10 14:06 ` Andrew Cagney
@ 2001-08-10 14:23   ` Keith Seitz
  2001-08-10 16:48     ` Andrew Cagney
  2001-08-10 17:41   ` Keith Seitz
  1 sibling, 1 reply; 5+ messages in thread
From: Keith Seitz @ 2001-08-10 14:23 UTC (permalink / raw)
  To: gdb-patches

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.)

Keith

> > ChangeLog
> > 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.
> >
> > 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 <<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 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);
> >
> >
> >
> >
>
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] Architecture change events
  2001-08-10 14:23   ` Keith Seitz
@ 2001-08-10 16:48     ` Andrew Cagney
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2001-08-10 16:48 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches

> 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  <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.
>> >
>> > 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 <<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 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);
>> >
>> >
>> >
>> >
> 
>>
>>
>>
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] Architecture change events
  2001-08-10 14:06 ` Andrew Cagney
  2001-08-10 14:23   ` Keith Seitz
@ 2001-08-10 17:41   ` Keith Seitz
  1 sibling, 0 replies; 5+ messages in thread
From: Keith Seitz @ 2001-08-10 17:41 UTC (permalink / raw)
  To: gdb-patches

Checked in.

Keith




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-08-10 17:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-10 13:50 [RFC] Architecture change events Keith Seitz
2001-08-10 14:06 ` Andrew Cagney
2001-08-10 14:23   ` Keith Seitz
2001-08-10 16:48     ` Andrew Cagney
2001-08-10 17:41   ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox