diff options
author | Tom Tromey <tromey@redhat.com> | 2013-12-18 10:52:58 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-19 07:47:30 -0700 |
commit | d9cb019581e7934faa292b5f9d0caa62be0ceef0 (patch) | |
tree | bb4bc4e036b5d5d321798ecabf5c47ad9fc0d68b /gdb/target-delegates.c | |
parent | 830ca33050cbad40e2d57ac9843033048e0160ca (diff) | |
download | gdb-d9cb019581e7934faa292b5f9d0caa62be0ceef0.zip gdb-d9cb019581e7934faa292b5f9d0caa62be0ceef0.tar.gz gdb-d9cb019581e7934faa292b5f9d0caa62be0ceef0.tar.bz2 |
convert to_log_command
2014-02-19 Tom Tromey <tromey@redhat.com>
* target-delegates.c: Rebuild.
* target.c (update_current_target): Don't inherit or default
to_log_command.
* target.h (struct target_ops) <to_log_command>: Use
TARGET_DEFAULT_IGNORE.
(target_log_command): Unconditionally delegate.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r-- | gdb/target-delegates.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 871e417..600e64e 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -472,6 +472,18 @@ tdefault_pid_to_exec_file (struct target_ops *self, int arg1) return 0; } +static void +delegate_log_command (struct target_ops *self, const char *arg1) +{ + self = self->beneath; + self->to_log_command (self, arg1); +} + +static void +tdefault_log_command (struct target_ops *self, const char *arg1) +{ +} + static int delegate_can_async_p (struct target_ops *self) { @@ -608,6 +620,8 @@ install_delegators (struct target_ops *ops) ops->to_rcmd = delegate_rcmd; if (ops->to_pid_to_exec_file == NULL) ops->to_pid_to_exec_file = delegate_pid_to_exec_file; + if (ops->to_log_command == NULL) + ops->to_log_command = delegate_log_command; if (ops->to_can_async_p == NULL) ops->to_can_async_p = delegate_can_async_p; if (ops->to_is_async_p == NULL) @@ -663,6 +677,7 @@ install_dummy_methods (struct target_ops *ops) ops->to_thread_name = tdefault_thread_name; ops->to_rcmd = default_rcmd; ops->to_pid_to_exec_file = tdefault_pid_to_exec_file; + ops->to_log_command = tdefault_log_command; ops->to_can_async_p = find_default_can_async_p; ops->to_is_async_p = find_default_is_async_p; ops->to_async = tdefault_async; |