aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index b41b316..d23bc75 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -1809,6 +1809,30 @@ debug_async (struct target_ops *self, int arg1)
fputs_unfiltered (")\n", gdb_stdlog);
}
+static void
+delegate_thread_events (struct target_ops *self, int arg1)
+{
+ self = self->beneath;
+ self->to_thread_events (self, arg1);
+}
+
+static void
+tdefault_thread_events (struct target_ops *self, int arg1)
+{
+}
+
+static void
+debug_thread_events (struct target_ops *self, int arg1)
+{
+ fprintf_unfiltered (gdb_stdlog, "-> %s->to_thread_events (...)\n", debug_target.to_shortname);
+ debug_target.to_thread_events (&debug_target, arg1);
+ fprintf_unfiltered (gdb_stdlog, "<- %s->to_thread_events (", debug_target.to_shortname);
+ target_debug_print_struct_target_ops_p (&debug_target);
+ fputs_unfiltered (", ", gdb_stdlog);
+ target_debug_print_int (arg1);
+ fputs_unfiltered (")\n", gdb_stdlog);
+}
+
static int
delegate_supports_non_stop (struct target_ops *self)
{
@@ -4186,6 +4210,8 @@ install_delegators (struct target_ops *ops)
ops->to_is_async_p = delegate_is_async_p;
if (ops->to_async == NULL)
ops->to_async = delegate_async;
+ if (ops->to_thread_events == NULL)
+ ops->to_thread_events = delegate_thread_events;
if (ops->to_supports_non_stop == NULL)
ops->to_supports_non_stop = delegate_supports_non_stop;
if (ops->to_always_non_stop_p == NULL)
@@ -4424,6 +4450,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_can_async_p = tdefault_can_async_p;
ops->to_is_async_p = tdefault_is_async_p;
ops->to_async = tdefault_async;
+ ops->to_thread_events = tdefault_thread_events;
ops->to_supports_non_stop = tdefault_supports_non_stop;
ops->to_always_non_stop_p = tdefault_always_non_stop_p;
ops->to_find_memory_regions = dummy_find_memory_regions;
@@ -4579,6 +4606,7 @@ init_debug_target (struct target_ops *ops)
ops->to_can_async_p = debug_can_async_p;
ops->to_is_async_p = debug_is_async_p;
ops->to_async = debug_async;
+ ops->to_thread_events = debug_thread_events;
ops->to_supports_non_stop = debug_supports_non_stop;
ops->to_always_non_stop_p = debug_always_non_stop_p;
ops->to_find_memory_regions = debug_find_memory_regions;