convert to_stop_recording

2014-02-19  Tom Tromey  <tromey@redhat.com>

	* record.c (record_stop): Unconditionally delegate.
	* target-delegates.c: Rebuild.
	* target.c (target_stop_recording): Unconditionally delegate.
	* target.h (struct target_ops) <to_stop_recording>: Use
	TARGET_DEFAULT_IGNORE.
This commit is contained in:
Tom Tromey 2013-12-19 08:21:20 -07:00
parent 6dc7fcf4c1
commit ee97f592f2
5 changed files with 27 additions and 13 deletions

View file

@ -1352,6 +1352,18 @@ tdefault_read_btrace (struct target_ops *self, VEC (btrace_block_s) **arg1, stru
tcomplain ();
}
static void
delegate_stop_recording (struct target_ops *self)
{
self = self->beneath;
self->to_stop_recording (self);
}
static void
tdefault_stop_recording (struct target_ops *self)
{
}
static void
delegate_save_record (struct target_ops *self, const char *arg1)
{
@ -1752,6 +1764,8 @@ install_delegators (struct target_ops *ops)
ops->to_teardown_btrace = delegate_teardown_btrace;
if (ops->to_read_btrace == NULL)
ops->to_read_btrace = delegate_read_btrace;
if (ops->to_stop_recording == NULL)
ops->to_stop_recording = delegate_stop_recording;
if (ops->to_save_record == NULL)
ops->to_save_record = delegate_save_record;
if (ops->to_delete_record == NULL)
@ -1897,6 +1911,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_disable_btrace = tdefault_disable_btrace;
ops->to_teardown_btrace = tdefault_teardown_btrace;
ops->to_read_btrace = tdefault_read_btrace;
ops->to_stop_recording = tdefault_stop_recording;
ops->to_save_record = tdefault_save_record;
ops->to_delete_record = tdefault_delete_record;
ops->to_record_is_replaying = tdefault_record_is_replaying;