Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Update UI events for tracepoints
@ 2001-05-29 12:38 Keith Seitz
  2001-06-06  6:06 ` Andrew Cagney
  2001-06-13 13:38 ` [RFA] Update UI events for tracepoints Andrew Cagney
  0 siblings, 2 replies; 5+ messages in thread
From: Keith Seitz @ 2001-05-29 12:38 UTC (permalink / raw)
  To: gdb-patches

Hi,

Currently, the only ui events implemented in gdb-events.sh is breakpoint
stuff. Tracepoints would be a logical runner-up for someone just beginning
to tinker with this. :-)

Changes to tracepoint.c to follow after this.

Comments/approval?
Keith


ChangeLog:
2001-05-29  Keith Seitz  <keiths@redhat.com>

	* gdb-events.sh: Update copyright.
	Use xfree () instead of free ().
	(function_list): Add tracepoint events.
	* gdb-events.h: Regenerated.
	* gdb-events.c: Regenerated.

Patch:
Index: gdb-events.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdb-events.sh,v
retrieving revision 1.5
diff -u -p -r1.5 gdb-events.sh
--- gdb-events.sh	2001/03/06 08:21:07	1.5
+++ gdb-events.sh	2001/05/29 19:14:55
@@ -1,7 +1,7 @@
 #!/bin/sh

 # User Interface Events.
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
 #
 # Contributed by Cygnus Solutions.
 #
@@ -61,6 +61,9 @@ function_list ()
 f:void:breakpoint_create:int b:b
 f:void:breakpoint_delete:int b:b
 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
 #*:void:annotate_starting_hook:void
 #*:void:annotate_stopped_hook:void
 #*:void:annotate_signalled_hook:void
@@ -109,7 +112,7 @@ copyright ()
 {
   cat <<EOF
 /* User Interface Events.
-   Copyright 1999 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.

    Contributed by Cygnus Solutions.

@@ -488,7 +491,7 @@ gdb_events_deliver (struct gdb_events *v
     {
       struct event *event = delivering_events;
       delivering_events = event->next;
-      free (event);
+      xfree (event);
     }
   /* Process any pending events.  Because one of the deliveries could
      bail out we move everything off of the pending queue onto an
@@ -523,7 +526,7 @@ done
 cat <<EOF
         }
       delivering_events = event->next;
-      free (event);
+      xfree (event);
     }
 }
 EOF


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

* Re: [RFA] Update UI events for tracepoints
  2001-05-29 12:38 [RFA] Update UI events for tracepoints Keith Seitz
@ 2001-06-06  6:06 ` Andrew Cagney
  2001-06-06  7:49   ` [PATCH] Update UI events for tracepoints (was Re: [RFA] Update UIevents for tracepoints) Keith Seitz
  2001-06-13 13:38 ` [RFA] Update UI events for tracepoints Andrew Cagney
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2001-06-06  6:06 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches

> Hi,
> 
> Currently, the only ui events implemented in gdb-events.sh is breakpoint
> stuff. Tracepoints would be a logical runner-up for someone just beginning
> to tinker with this. :-)
> 
> Changes to tracepoint.c to follow after this.
> 
> Comments/approval?


Yes!  At last someone is looking at this!  Just do it as two separate 
commits.  The s/free/xfree/ change is pretty obvious and can separatly 
go straight in.

	Andrew

PS: I've wondered about renaming gdb-events.* to gdb-hooks.* but I don't 
care.

> Keith
> 
> 
> ChangeLog:
> 2001-05-29  Keith Seitz  <keiths@redhat.com>
> 
> * gdb-events.sh: Update copyright.
> 	Use xfree () instead of free ().
> 	(function_list): Add tracepoint events.
> 	* gdb-events.h: Regenerated.
> 	* gdb-events.c: Regenerated.
> 
> Patch:
> Index: gdb-events.sh
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdb-events.sh,v
> retrieving revision 1.5
> diff -u -p -r1.5 gdb-events.sh
> --- gdb-events.sh	2001/03/06 08:21:07	1.5
> +++ gdb-events.sh	2001/05/29 19:14:55
> @@ -1,7 +1,7 @@
>  #!/bin/sh
> 
>  # User Interface Events.
> -# Copyright 1999, 2000 Free Software Foundation, Inc.
> +# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
>  #
>  # Contributed by Cygnus Solutions.
>  #
> @@ -61,6 +61,9 @@ function_list ()
>  f:void:breakpoint_create:int b:b
>  f:void:breakpoint_delete:int b:b
>  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
>  #*:void:annotate_starting_hook:void
>  #*:void:annotate_stopped_hook:void
>  #*:void:annotate_signalled_hook:void
> @@ -109,7 +112,7 @@ copyright ()
>  {
>    cat <<EOF
>  /* User Interface Events.
> -   Copyright 1999 Free Software Foundation, Inc.
> +   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
> 
>     Contributed by Cygnus Solutions.
> 
> @@ -488,7 +491,7 @@ gdb_events_deliver (struct gdb_events *v
>      {
>        struct event *event = delivering_events;
>        delivering_events = event->next;
> -      free (event);
> +      xfree (event);
>      }
>    /* Process any pending events.  Because one of the deliveries could
>       bail out we move everything off of the pending queue onto an
> @@ -523,7 +526,7 @@ done
>  cat <<EOF
>          }
>        delivering_events = event->next;
> -      free (event);
> +      xfree (event);
>      }
>  }
>  EOF
> 
> 
> 



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

* [PATCH] Update UI events for tracepoints (was Re: [RFA] Update UIevents for tracepoints)
  2001-06-06  6:06 ` Andrew Cagney
@ 2001-06-06  7:49   ` Keith Seitz
  0 siblings, 0 replies; 5+ messages in thread
From: Keith Seitz @ 2001-06-06  7:49 UTC (permalink / raw)
  To: gdb-patches

On Wed, 6 Jun 2001, Andrew Cagney wrote:

> Keith Seitz wrote:
> >
> > Comments/approval?
>
> Yes!  At last someone is looking at this!  Just do it as two separate
> commits.  The s/free/xfree/ change is pretty obvious and can separatly
> go straight in.

s/free/xfree committed separately.

Here's the info on the patch just committed for adding tracepoint events:

ChangeLog
2001-06-06  Keith Seitz  <keiths@redhat.com>

	* gdb-events.sh (function_list): Add tracepoint_create,
	tracepoint_delete, and tracepoint_modify events.
	* gdb-events.c: Regenerated.
	* gdb-events.h: Regenerated.

Patch
Index: gdb-events.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdb-events.sh,v
retrieving revision 1.6
diff -u -p -r1.6 gdb-events.sh
--- gdb-events.sh	2001/06/06 14:36:05	1.6
+++ gdb-events.sh	2001/06/06 14:44:00
@@ -61,6 +61,9 @@ function_list ()
 f:void:breakpoint_create:int b:b
 f:void:breakpoint_delete:int b:b
 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
 #*:void:annotate_starting_hook:void
 #*:void:annotate_stopped_hook:void
 #*:void:annotate_signalled_hook:void

> PS: I've wondered about renaming gdb-events.* to gdb-hooks.* but I don't
> care.

It seems to me that the file could  be used as hooks OR events. I've been
using them as hooks in Insight, but my expectation is to switch to using
an (external) event loop eventually.

Keith


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

* Re: [RFA] Update UI events for tracepoints
  2001-05-29 12:38 [RFA] Update UI events for tracepoints Keith Seitz
  2001-06-06  6:06 ` Andrew Cagney
@ 2001-06-13 13:38 ` Andrew Cagney
  2001-06-14 10:10   ` Keith Seitz
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2001-06-13 13:38 UTC (permalink / raw)
  To: Keith Seitz; +Cc: gdb-patches

Yes, ok.  Wow! This means that this is file is now more than just proof 
of concept!
BTW, I think deleting the old GDBtk only hooks should be an obvious fix :-)

	Andrew


> Hi,
> 
> Currently, the only ui events implemented in gdb-events.sh is breakpoint
> stuff. Tracepoints would be a logical runner-up for someone just beginning
> to tinker with this. :-)
> 
> Changes to tracepoint.c to follow after this.
> 
> Comments/approval?
> Keith
> 
> 
> ChangeLog:
> 2001-05-29  Keith Seitz  <keiths@redhat.com>
> 
> * gdb-events.sh: Update copyright.
> 	Use xfree () instead of free ().
> 	(function_list): Add tracepoint events.
> 	* gdb-events.h: Regenerated.
> 	* gdb-events.c: Regenerated.
> 
> Patch:
> Index: gdb-events.sh
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdb-events.sh,v
> retrieving revision 1.5
> diff -u -p -r1.5 gdb-events.sh
> --- gdb-events.sh	2001/03/06 08:21:07	1.5
> +++ gdb-events.sh	2001/05/29 19:14:55
> @@ -1,7 +1,7 @@
>  #!/bin/sh
> 
>  # User Interface Events.
> -# Copyright 1999, 2000 Free Software Foundation, Inc.
> +# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
>  #
>  # Contributed by Cygnus Solutions.
>  #
> @@ -61,6 +61,9 @@ function_list ()
>  f:void:breakpoint_create:int b:b
>  f:void:breakpoint_delete:int b:b
>  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
>  #*:void:annotate_starting_hook:void
>  #*:void:annotate_stopped_hook:void
>  #*:void:annotate_signalled_hook:void
> @@ -109,7 +112,7 @@ copyright ()
>  {
>    cat <<EOF
>  /* User Interface Events.
> -   Copyright 1999 Free Software Foundation, Inc.
> +   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
> 
>     Contributed by Cygnus Solutions.
> 
> @@ -488,7 +491,7 @@ gdb_events_deliver (struct gdb_events *v
>      {
>        struct event *event = delivering_events;
>        delivering_events = event->next;
> -      free (event);
> +      xfree (event);
>      }
>    /* Process any pending events.  Because one of the deliveries could
>       bail out we move everything off of the pending queue onto an
> @@ -523,7 +526,7 @@ done
>  cat <<EOF
>          }
>        delivering_events = event->next;
> -      free (event);
> +      xfree (event);
>      }
>  }
>  EOF
> 
> 
> 



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

* Re: [RFA] Update UI events for tracepoints
  2001-06-13 13:38 ` [RFA] Update UI events for tracepoints Andrew Cagney
@ 2001-06-14 10:10   ` Keith Seitz
  0 siblings, 0 replies; 5+ messages in thread
From: Keith Seitz @ 2001-06-14 10:10 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

On Wed, 13 Jun 2001, Andrew Cagney wrote:

> BTW, I think deleting the old GDBtk only hooks should be an obvious fix :-)

Done.

Keith

ChangeLog
2001-06-14  Keith Seitz  <keiths@redhat.com>

	* tracepoint.c (trace_command): We now have tracepoint
	events. Get rid of those ugly hooks.
	(tracepoint_operation): Likewise.
	(trace_pass_command): Likewise.

Patch
Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.22
diff -u -p -r1.22 tracepoint.c
--- tracepoint.c	2001/06/11 16:05:24	1.22
+++ tracepoint.c	2001/06/14 17:06:43
@@ -424,10 +424,6 @@ trace_command (char *arg, int from_tty)
 	t->addr_string = savestring (addr_start, addr_end - addr_start);

       trace_mention (t);
-
-      /* Let the UI know of any additions */
-      if (create_tracepoint_hook)
-	create_tracepoint_hook (t);
     }

   if (sals.nelts > 1)
@@ -574,14 +570,10 @@ tracepoint_operation (struct tracepoint
     {
     case enable_op:
       t->enabled = enabled;
-      if (modify_tracepoint_hook)
-	modify_tracepoint_hook (t);
       tracepoint_modify_event (t->number);
       break;
     case disable_op:
       t->enabled = disabled;
-      if (modify_tracepoint_hook)
-	modify_tracepoint_hook (t);
       tracepoint_modify_event (t->number);
       break;
     case delete_op:
@@ -596,10 +588,6 @@ tracepoint_operation (struct tracepoint
 	  break;
 	}

-      /* Let the UI know of any deletions */
-      if (delete_tracepoint_hook)
-	delete_tracepoint_hook (t);
-
       if (t->addr_string)
 	xfree (t->addr_string);
       if (t->source_file)
@@ -745,8 +733,6 @@ trace_pass_command (char *args, int from
 	    if (t1 == (struct tracepoint *) -1 || t1 == t2)
 	      {
 		t2->pass_count = count;
-		if (modify_tracepoint_hook)
-		  modify_tracepoint_hook (t2);
 		tracepoint_modify_event (t2->number);
 		if (from_tty)
 		  printf_filtered ("Setting tracepoint %d's passcount to %d\n",


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

end of thread, other threads:[~2001-06-14 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-29 12:38 [RFA] Update UI events for tracepoints Keith Seitz
2001-06-06  6:06 ` Andrew Cagney
2001-06-06  7:49   ` [PATCH] Update UI events for tracepoints (was Re: [RFA] Update UIevents for tracepoints) Keith Seitz
2001-06-13 13:38 ` [RFA] Update UI events for tracepoints Andrew Cagney
2001-06-14 10:10   ` Keith Seitz

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