2015-09-18 Markus Metzger <markus.t.metzger@intel.com>
+ * record-btrace.c (record_btrace_maybe_mark_async_event): New.
+ (record_btrace_wait): Call record_btrace_maybe_mark_async_event.
+
+2015-09-18 Markus Metzger <markus.t.metzger@intel.com>
+
* record-btrace.c (get_thread_current_frame): New.
(record_btrace_start_replaying): Call get_thread_current_frame.
typedef struct thread_info * tp_t;
DEF_VEC_P (tp_t);
+/* Announce further events if necessary. */
+
+static void
+record_btrace_maybe_mark_async_event (const VEC (tp_t) *moving,
+ const VEC (tp_t) *no_history)
+{
+ int more_moving, more_no_history;
+
+ more_moving = !VEC_empty (tp_t, moving);
+ more_no_history = !VEC_empty (tp_t, no_history);
+
+ if (!more_moving && !more_no_history)
+ return;
+
+ if (more_moving)
+ DEBUG ("movers pending");
+
+ if (more_no_history)
+ DEBUG ("no-history pending");
+
+ mark_async_event_handler (record_btrace_async_inferior_event_handler);
+}
+
/* The to_wait method of target record-btrace. */
static ptid_t
ALL_NON_EXITED_THREADS (tp)
record_btrace_cancel_resume (tp);
+ /* In async mode, we need to announce further events. */
+ if (target_is_async_p ())
+ record_btrace_maybe_mark_async_event (moving, no_history);
+
/* Start record histories anew from the current position. */
record_btrace_clear_histories (&eventing->btrace);