convert to_set_disconnected_tracing

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

	* target-delegates.c: Rebuild.
	* target.c (update_current_target): Don't inherit or default
	to_set_disconnected_tracing.
	* target.h (struct target_ops) <to_set_disconnected_tracing>: Use
	TARGET_DEFAULT_IGNORE.
This commit is contained in:
Tom Tromey 2013-12-18 14:12:29 -07:00
parent 9249843f19
commit 0bcfeddf50
4 changed files with 26 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
* target.c (update_current_target): Don't inherit or default
to_set_disconnected_tracing.
* target.h (struct target_ops) <to_set_disconnected_tracing>: Use
TARGET_DEFAULT_IGNORE.
2014-02-19 Tom Tromey <tromey@redhat.com> 2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild. * target-delegates.c: Rebuild.

View file

@ -871,6 +871,18 @@ tdefault_get_min_fast_tracepoint_insn_len (struct target_ops *self)
return -1; return -1;
} }
static void
delegate_set_disconnected_tracing (struct target_ops *self, int arg1)
{
self = self->beneath;
self->to_set_disconnected_tracing (self, arg1);
}
static void
tdefault_set_disconnected_tracing (struct target_ops *self, int arg1)
{
}
static int static int
delegate_supports_btrace (struct target_ops *self) delegate_supports_btrace (struct target_ops *self)
{ {
@ -1035,6 +1047,8 @@ install_delegators (struct target_ops *ops)
ops->to_get_raw_trace_data = delegate_get_raw_trace_data; ops->to_get_raw_trace_data = delegate_get_raw_trace_data;
if (ops->to_get_min_fast_tracepoint_insn_len == NULL) if (ops->to_get_min_fast_tracepoint_insn_len == NULL)
ops->to_get_min_fast_tracepoint_insn_len = delegate_get_min_fast_tracepoint_insn_len; ops->to_get_min_fast_tracepoint_insn_len = delegate_get_min_fast_tracepoint_insn_len;
if (ops->to_set_disconnected_tracing == NULL)
ops->to_set_disconnected_tracing = delegate_set_disconnected_tracing;
if (ops->to_supports_btrace == NULL) if (ops->to_supports_btrace == NULL)
ops->to_supports_btrace = delegate_supports_btrace; ops->to_supports_btrace = delegate_supports_btrace;
} }
@ -1116,5 +1130,6 @@ install_dummy_methods (struct target_ops *ops)
ops->to_upload_trace_state_variables = tdefault_upload_trace_state_variables; ops->to_upload_trace_state_variables = tdefault_upload_trace_state_variables;
ops->to_get_raw_trace_data = tdefault_get_raw_trace_data; ops->to_get_raw_trace_data = tdefault_get_raw_trace_data;
ops->to_get_min_fast_tracepoint_insn_len = tdefault_get_min_fast_tracepoint_insn_len; ops->to_get_min_fast_tracepoint_insn_len = tdefault_get_min_fast_tracepoint_insn_len;
ops->to_set_disconnected_tracing = tdefault_set_disconnected_tracing;
ops->to_supports_btrace = tdefault_supports_btrace; ops->to_supports_btrace = tdefault_supports_btrace;
} }

View file

@ -704,7 +704,7 @@ update_current_target (void)
/* Do not inherit to_upload_trace_state_variables. */ /* Do not inherit to_upload_trace_state_variables. */
/* Do not inherit to_get_raw_trace_data. */ /* Do not inherit to_get_raw_trace_data. */
/* Do not inherit to_get_min_fast_tracepoint_insn_len. */ /* Do not inherit to_get_min_fast_tracepoint_insn_len. */
INHERIT (to_set_disconnected_tracing, t); /* Do not inherit to_set_disconnected_tracing. */
INHERIT (to_set_circular_trace_buffer, t); INHERIT (to_set_circular_trace_buffer, t);
INHERIT (to_set_trace_buffer_size, t); INHERIT (to_set_trace_buffer_size, t);
INHERIT (to_set_trace_notes, t); INHERIT (to_set_trace_notes, t);
@ -750,9 +750,6 @@ update_current_target (void)
(void (*) (struct target_ops *, ptid_t)) (void (*) (struct target_ops *, ptid_t))
target_ignore); target_ignore);
current_target.to_read_description = NULL; current_target.to_read_description = NULL;
de_fault (to_set_disconnected_tracing,
(void (*) (struct target_ops *, int))
target_ignore);
de_fault (to_set_circular_trace_buffer, de_fault (to_set_circular_trace_buffer,
(void (*) (struct target_ops *, int)) (void (*) (struct target_ops *, int))
target_ignore); target_ignore);

View file

@ -893,7 +893,8 @@ struct target_ops
/* Set the target's tracing behavior in response to unexpected /* Set the target's tracing behavior in response to unexpected
disconnection - set VAL to 1 to keep tracing, 0 to stop. */ disconnection - set VAL to 1 to keep tracing, 0 to stop. */
void (*to_set_disconnected_tracing) (struct target_ops *, int val); void (*to_set_disconnected_tracing) (struct target_ops *, int val)
TARGET_DEFAULT_IGNORE ();
void (*to_set_circular_trace_buffer) (struct target_ops *, int val); void (*to_set_circular_trace_buffer) (struct target_ops *, int val);
/* Set the size of trace buffer in the target. */ /* Set the size of trace buffer in the target. */
void (*to_set_trace_buffer_size) (struct target_ops *, LONGEST val); void (*to_set_trace_buffer_size) (struct target_ops *, LONGEST val);