/* The to_async method of target record-btrace. */
static void
-record_btrace_async (struct target_ops *ops,
- void (*callback) (enum inferior_event_type event_type,
- void *context),
- void *context)
+record_btrace_async (struct target_ops *ops, int enable)
{
- if (callback != NULL)
+ if (enable)
mark_async_event_handler (record_btrace_async_inferior_event_handler);
else
clear_async_event_handler (record_btrace_async_inferior_event_handler);
- ops->beneath->to_async (ops->beneath, callback, context);
+ ops->beneath->to_async (ops->beneath, enable);
}
/* Adjusts the size and returns a human readable size suffix. */
{
ret = ops->beneath->to_insert_breakpoint (ops->beneath, gdbarch, bp_tgt);
}
-
- replay_memory_access = old;
-
CATCH (except, RETURN_MASK_ALL)
{
+ replay_memory_access = old;
throw_exception (except);
}
END_CATCH
+ replay_memory_access = old;
return ret;
}
{
ret = ops->beneath->to_remove_breakpoint (ops->beneath, gdbarch, bp_tgt);
}
-
- replay_memory_access = old;
-
CATCH (except, RETURN_MASK_ALL)
{
+ replay_memory_access = old;
throw_exception (except);
}
END_CATCH
+ replay_memory_access = old;
return ret;
}
if (upd_step_stack_frame_id)
tp->control.step_stack_frame_id = frame_id;
}
-
- /* Restore the previous execution state. */
- set_executing (tp->ptid, executing);
-
CATCH (except, RETURN_MASK_ALL)
{
+ /* Restore the previous execution state. */
+ set_executing (tp->ptid, executing);
+
xfree (btinfo->replay);
btinfo->replay = NULL;
}
END_CATCH
+ /* Restore the previous execution state. */
+ set_executing (tp->ptid, executing);
+
return replay;
}
/* Async support. */
if (target_can_async_p ())
{
- target_async (inferior_event_handler, 0);
+ target_async (1);
mark_async_event_handler (record_btrace_async_inferior_event_handler);
}
}