* gdb-events.sh (selected_thread_changed): New event.
* gdb-events.c: Regenerated. * gdb-events.h: Regenerated.
This commit is contained in:
parent
6eecb1c8dd
commit
28ee05e924
4 changed files with 42 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-09-30 Keith Seitz <keiths@redhat.com>
|
||||
|
||||
* gdb-events.sh (selected_thread_changed): New event.
|
||||
* gdb-events.c: Regenerated.
|
||||
* gdb-events.h: Regenerated.
|
||||
|
||||
2002-09-30 Hans-Peter Nilsson <hp@bitrange.com>
|
||||
|
||||
* MAINTAINERS: Add self to Write After Approval list.
|
||||
|
|
|
@ -139,6 +139,16 @@ selected_frame_level_changed_event (int level)
|
|||
current_event_hooks->selected_frame_level_changed (level);
|
||||
}
|
||||
|
||||
void
|
||||
selected_thread_changed_event (int thread_num)
|
||||
{
|
||||
if (gdb_events_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "selected_thread_changed_event\n");
|
||||
if (!current_event_hooks->selected_thread_changed)
|
||||
return;
|
||||
current_event_hooks->selected_thread_changed (thread_num);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if WITH_GDB_EVENTS
|
||||
|
@ -173,6 +183,7 @@ enum gdb_event
|
|||
architecture_changed,
|
||||
target_changed,
|
||||
selected_frame_level_changed,
|
||||
selected_thread_changed,
|
||||
nr_gdb_events
|
||||
};
|
||||
|
||||
|
@ -211,6 +222,11 @@ struct selected_frame_level_changed
|
|||
int level;
|
||||
};
|
||||
|
||||
struct selected_thread_changed
|
||||
{
|
||||
int thread_num;
|
||||
};
|
||||
|
||||
struct event
|
||||
{
|
||||
enum gdb_event type;
|
||||
|
@ -224,6 +240,7 @@ struct event
|
|||
struct tracepoint_delete tracepoint_delete;
|
||||
struct tracepoint_modify tracepoint_modify;
|
||||
struct selected_frame_level_changed selected_frame_level_changed;
|
||||
struct selected_thread_changed selected_thread_changed;
|
||||
}
|
||||
data;
|
||||
};
|
||||
|
@ -319,6 +336,15 @@ queue_selected_frame_level_changed (int level)
|
|||
append (event);
|
||||
}
|
||||
|
||||
static void
|
||||
queue_selected_thread_changed (int thread_num)
|
||||
{
|
||||
struct event *event = XMALLOC (struct event);
|
||||
event->type = selected_thread_changed;
|
||||
event->data.selected_thread_changed.thread_num = thread_num;
|
||||
append (event);
|
||||
}
|
||||
|
||||
void
|
||||
gdb_events_deliver (struct gdb_events *vector)
|
||||
{
|
||||
|
@ -374,6 +400,10 @@ gdb_events_deliver (struct gdb_events *vector)
|
|||
vector->selected_frame_level_changed
|
||||
(event->data.selected_frame_level_changed.level);
|
||||
break;
|
||||
case selected_thread_changed:
|
||||
vector->selected_thread_changed
|
||||
(event->data.selected_thread_changed.thread_num);
|
||||
break;
|
||||
}
|
||||
delivering_events = event->next;
|
||||
xfree (event);
|
||||
|
@ -395,6 +425,7 @@ _initialize_gdb_events (void)
|
|||
queue_event_hooks.architecture_changed = queue_architecture_changed;
|
||||
queue_event_hooks.target_changed = queue_target_changed;
|
||||
queue_event_hooks.selected_frame_level_changed = queue_selected_frame_level_changed;
|
||||
queue_event_hooks.selected_thread_changed = queue_selected_thread_changed;
|
||||
#endif
|
||||
|
||||
c = add_set_cmd ("eventdebug", class_maintenance, var_zinteger,
|
||||
|
|
|
@ -61,6 +61,7 @@ typedef void (gdb_events_tracepoint_modify_ftype) (int number);
|
|||
typedef void (gdb_events_architecture_changed_ftype) (void);
|
||||
typedef void (gdb_events_target_changed_ftype) (void);
|
||||
typedef void (gdb_events_selected_frame_level_changed_ftype) (int level);
|
||||
typedef void (gdb_events_selected_thread_changed_ftype) (int thread_num);
|
||||
|
||||
|
||||
/* gdb-events: object. */
|
||||
|
@ -76,6 +77,7 @@ struct gdb_events
|
|||
gdb_events_architecture_changed_ftype *architecture_changed;
|
||||
gdb_events_target_changed_ftype *target_changed;
|
||||
gdb_events_selected_frame_level_changed_ftype *selected_frame_level_changed;
|
||||
gdb_events_selected_thread_changed_ftype *selected_thread_changed;
|
||||
};
|
||||
|
||||
|
||||
|
@ -91,6 +93,7 @@ extern void tracepoint_modify_event (int number);
|
|||
extern void architecture_changed_event (void);
|
||||
extern void target_changed_event (void);
|
||||
extern void selected_frame_level_changed_event (int level);
|
||||
extern void selected_thread_changed_event (int thread_num);
|
||||
|
||||
|
||||
/* When GDB_EVENTS are not being used, completly disable them. */
|
||||
|
@ -105,6 +108,7 @@ extern void selected_frame_level_changed_event (int level);
|
|||
#define architecture_changed_event() 0
|
||||
#define target_changed_event() 0
|
||||
#define selected_frame_level_changed_event(level) 0
|
||||
#define selected_thread_changed_event(thread_num) 0
|
||||
#endif
|
||||
|
||||
/* Install custom gdb-events hooks. */
|
||||
|
|
|
@ -67,6 +67,7 @@ f:void:tracepoint_modify:int number:number
|
|||
f:void:architecture_changed:void
|
||||
f:void:target_changed:void
|
||||
f:void:selected_frame_level_changed:int level:level
|
||||
f:void:selected_thread_changed:int thread_num:thread_num
|
||||
#*:void:annotate_starting_hook:void
|
||||
#*:void:annotate_stopped_hook:void
|
||||
#*:void:annotate_signalled_hook:void
|
||||
|
|
Loading…
Reference in a new issue