* gdb-events.sh (function_list): Add tracepoint_create,
tracepoint_delete, and tracepoint_modify events. * gdb-events.c: Regenerated. * gdb-events.h: Regenerated.
This commit is contained in:
parent
cea35b0824
commit
ba9fe0367b
4 changed files with 115 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
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.
|
||||
|
||||
2001-06-06 Keith Seitz <keiths@redhat.com>
|
||||
|
||||
* gdb-events.sh: Update copyrights.
|
||||
|
|
|
@ -81,6 +81,36 @@ breakpoint_modify_event (int b)
|
|||
current_event_hooks->breakpoint_modify (b);
|
||||
}
|
||||
|
||||
void
|
||||
tracepoint_create_event (int number)
|
||||
{
|
||||
if (gdb_events_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "tracepoint_create_event\n");
|
||||
if (!current_event_hooks->tracepoint_create)
|
||||
return;
|
||||
current_event_hooks->tracepoint_create (number);
|
||||
}
|
||||
|
||||
void
|
||||
tracepoint_delete_event (int number)
|
||||
{
|
||||
if (gdb_events_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "tracepoint_delete_event\n");
|
||||
if (!current_event_hooks->tracepoint_delete)
|
||||
return;
|
||||
current_event_hooks->tracepoint_delete (number);
|
||||
}
|
||||
|
||||
void
|
||||
tracepoint_modify_event (int number)
|
||||
{
|
||||
if (gdb_events_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "tracepoint_modify_event\n");
|
||||
if (!current_event_hooks->tracepoint_modify)
|
||||
return;
|
||||
current_event_hooks->tracepoint_modify (number);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if WITH_GDB_EVENTS
|
||||
|
@ -101,6 +131,9 @@ enum gdb_event
|
|||
breakpoint_create,
|
||||
breakpoint_delete,
|
||||
breakpoint_modify,
|
||||
tracepoint_create,
|
||||
tracepoint_delete,
|
||||
tracepoint_modify,
|
||||
nr_gdb_events
|
||||
};
|
||||
|
||||
|
@ -119,6 +152,21 @@ struct breakpoint_modify
|
|||
int b;
|
||||
};
|
||||
|
||||
struct tracepoint_create
|
||||
{
|
||||
int number;
|
||||
};
|
||||
|
||||
struct tracepoint_delete
|
||||
{
|
||||
int number;
|
||||
};
|
||||
|
||||
struct tracepoint_modify
|
||||
{
|
||||
int number;
|
||||
};
|
||||
|
||||
struct event
|
||||
{
|
||||
enum gdb_event type;
|
||||
|
@ -128,6 +176,9 @@ struct event
|
|||
struct breakpoint_create breakpoint_create;
|
||||
struct breakpoint_delete breakpoint_delete;
|
||||
struct breakpoint_modify breakpoint_modify;
|
||||
struct tracepoint_create tracepoint_create;
|
||||
struct tracepoint_delete tracepoint_delete;
|
||||
struct tracepoint_modify tracepoint_modify;
|
||||
}
|
||||
data;
|
||||
};
|
||||
|
@ -171,6 +222,33 @@ queue_breakpoint_modify (int b)
|
|||
append (event);
|
||||
}
|
||||
|
||||
static void
|
||||
queue_tracepoint_create (int number)
|
||||
{
|
||||
struct event *event = XMALLOC (struct event);
|
||||
event->type = tracepoint_create;
|
||||
event->data.tracepoint_create.number = number;
|
||||
append (event);
|
||||
}
|
||||
|
||||
static void
|
||||
queue_tracepoint_delete (int number)
|
||||
{
|
||||
struct event *event = XMALLOC (struct event);
|
||||
event->type = tracepoint_delete;
|
||||
event->data.tracepoint_delete.number = number;
|
||||
append (event);
|
||||
}
|
||||
|
||||
static void
|
||||
queue_tracepoint_modify (int number)
|
||||
{
|
||||
struct event *event = XMALLOC (struct event);
|
||||
event->type = tracepoint_modify;
|
||||
event->data.tracepoint_modify.number = number;
|
||||
append (event);
|
||||
}
|
||||
|
||||
void
|
||||
gdb_events_deliver (struct gdb_events *vector)
|
||||
{
|
||||
|
@ -204,6 +282,18 @@ gdb_events_deliver (struct gdb_events *vector)
|
|||
vector->breakpoint_modify
|
||||
(event->data.breakpoint_modify.b);
|
||||
break;
|
||||
case tracepoint_create:
|
||||
vector->tracepoint_create
|
||||
(event->data.tracepoint_create.number);
|
||||
break;
|
||||
case tracepoint_delete:
|
||||
vector->tracepoint_delete
|
||||
(event->data.tracepoint_delete.number);
|
||||
break;
|
||||
case tracepoint_modify:
|
||||
vector->tracepoint_modify
|
||||
(event->data.tracepoint_modify.number);
|
||||
break;
|
||||
}
|
||||
delivering_events = event->next;
|
||||
xfree (event);
|
||||
|
@ -219,6 +309,9 @@ _initialize_gdb_events (void)
|
|||
queue_event_hooks.breakpoint_create = queue_breakpoint_create;
|
||||
queue_event_hooks.breakpoint_delete = queue_breakpoint_delete;
|
||||
queue_event_hooks.breakpoint_modify = queue_breakpoint_modify;
|
||||
queue_event_hooks.tracepoint_create = queue_tracepoint_create;
|
||||
queue_event_hooks.tracepoint_delete = queue_tracepoint_delete;
|
||||
queue_event_hooks.tracepoint_modify = queue_tracepoint_modify;
|
||||
#endif
|
||||
|
||||
c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
|
||||
|
|
|
@ -54,6 +54,9 @@
|
|||
typedef void (gdb_events_breakpoint_create_ftype) (int b);
|
||||
typedef void (gdb_events_breakpoint_delete_ftype) (int b);
|
||||
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);
|
||||
|
||||
|
||||
/* gdb-events: object. */
|
||||
|
@ -63,6 +66,9 @@ struct gdb_events
|
|||
gdb_events_breakpoint_create_ftype *breakpoint_create;
|
||||
gdb_events_breakpoint_delete_ftype *breakpoint_delete;
|
||||
gdb_events_breakpoint_modify_ftype *breakpoint_modify;
|
||||
gdb_events_tracepoint_create_ftype *tracepoint_create;
|
||||
gdb_events_tracepoint_delete_ftype *tracepoint_delete;
|
||||
gdb_events_tracepoint_modify_ftype *tracepoint_modify;
|
||||
};
|
||||
|
||||
|
||||
|
@ -72,6 +78,9 @@ struct gdb_events
|
|||
extern void breakpoint_create_event (int b);
|
||||
extern void breakpoint_delete_event (int b);
|
||||
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);
|
||||
|
||||
|
||||
/* When GDB_EVENTS are not being used, completly disable them. */
|
||||
|
@ -80,6 +89,9 @@ extern void breakpoint_modify_event (int b);
|
|||
#define breakpoint_create_event(b) 0
|
||||
#define breakpoint_delete_event(b) 0
|
||||
#define breakpoint_modify_event(b) 0
|
||||
#define tracepoint_create_event(number) 0
|
||||
#define tracepoint_delete_event(number) 0
|
||||
#define tracepoint_modify_event(number) 0
|
||||
#endif
|
||||
|
||||
/* Install custom gdb-events hooks. */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue