From 91df8d1d35ec381563b978a836b5bd6987d236db Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 18 Dec 2013 14:14:58 -0700 Subject: [PATCH] convert to_set_trace_buffer_size 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. * target.c (update_current_target): Don't initialize to_set_trace_buffer_size. * target.h (struct target_ops) : Use TARGET_DEFAULT_IGNORE. --- gdb/ChangeLog | 8 ++++++++ gdb/target-delegates.c | 15 +++++++++++++++ gdb/target.c | 5 +---- gdb/target.h | 3 ++- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 179ac4b6d5..ac191d1e93 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2014-02-19 Tom Tromey + + * target-delegates.c: Rebuild. + * target.c (update_current_target): Don't initialize + to_set_trace_buffer_size. + * target.h (struct target_ops) : Use + TARGET_DEFAULT_IGNORE. + 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 6fb242a939..d482a7285b 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -895,6 +895,18 @@ tdefault_set_circular_trace_buffer (struct target_ops *self, int arg1) { } +static void +delegate_set_trace_buffer_size (struct target_ops *self, LONGEST arg1) +{ + self = self->beneath; + self->to_set_trace_buffer_size (self, arg1); +} + +static void +tdefault_set_trace_buffer_size (struct target_ops *self, LONGEST arg1) +{ +} + static int delegate_supports_btrace (struct target_ops *self) { @@ -1063,6 +1075,8 @@ install_delegators (struct target_ops *ops) ops->to_set_disconnected_tracing = delegate_set_disconnected_tracing; if (ops->to_set_circular_trace_buffer == NULL) ops->to_set_circular_trace_buffer = delegate_set_circular_trace_buffer; + if (ops->to_set_trace_buffer_size == NULL) + ops->to_set_trace_buffer_size = delegate_set_trace_buffer_size; if (ops->to_supports_btrace == NULL) ops->to_supports_btrace = delegate_supports_btrace; } @@ -1146,5 +1160,6 @@ install_dummy_methods (struct target_ops *ops) 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_set_circular_trace_buffer = tdefault_set_circular_trace_buffer; + ops->to_set_trace_buffer_size = tdefault_set_trace_buffer_size; ops->to_supports_btrace = tdefault_supports_btrace; } diff --git a/gdb/target.c b/gdb/target.c index 96135aeabe..febf07bc22 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -706,7 +706,7 @@ update_current_target (void) /* Do not inherit to_get_min_fast_tracepoint_insn_len. */ /* Do not inherit to_set_disconnected_tracing. */ /* Do not inherit to_set_circular_trace_buffer. */ - INHERIT (to_set_trace_buffer_size, t); + /* Do not inherit to_set_trace_buffer_size. */ INHERIT (to_set_trace_notes, t); INHERIT (to_get_tib_address, t); INHERIT (to_set_permissions, t); @@ -750,9 +750,6 @@ update_current_target (void) (void (*) (struct target_ops *, ptid_t)) target_ignore); current_target.to_read_description = NULL; - de_fault (to_set_trace_buffer_size, - (void (*) (struct target_ops *, LONGEST)) - target_ignore); de_fault (to_set_trace_notes, (int (*) (struct target_ops *, const char *, const char *, const char *)) diff --git a/gdb/target.h b/gdb/target.h index c195295677..7f672ebadf 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -898,7 +898,8 @@ struct target_ops void (*to_set_circular_trace_buffer) (struct target_ops *, int val) TARGET_DEFAULT_IGNORE (); /* 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) + TARGET_DEFAULT_IGNORE (); /* Add/change textual notes about the trace run, returning 1 if successful, 0 otherwise. */