aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 10:51:10 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:47:30 -0700
commit830ca33050cbad40e2d57ac9843033048e0160ca (patch)
treeea51a23bd0f480ee0e2516c142efef48f0896e70 /gdb/target-delegates.c
parent825828fcf34539d98b0c10f9c33d35a9641c8018 (diff)
downloadbinutils-830ca33050cbad40e2d57ac9843033048e0160ca.zip
binutils-830ca33050cbad40e2d57ac9843033048e0160ca.tar.gz
binutils-830ca33050cbad40e2d57ac9843033048e0160ca.tar.bz2
convert to_pid_to_exec_file
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_pid_to_exec_file. * target.h (struct target_ops) <to_pid_to_exec_file>: Use TARGET_DEFAULT_RETURN.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 6658ee9..871e417 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -459,6 +459,19 @@ delegate_rcmd (struct target_ops *self, char *arg1, struct ui_file *arg2)
self->to_rcmd (self, arg1, arg2);
}
+static char *
+delegate_pid_to_exec_file (struct target_ops *self, int arg1)
+{
+ self = self->beneath;
+ return self->to_pid_to_exec_file (self, arg1);
+}
+
+static char *
+tdefault_pid_to_exec_file (struct target_ops *self, int arg1)
+{
+ return 0;
+}
+
static int
delegate_can_async_p (struct target_ops *self)
{
@@ -593,6 +606,8 @@ install_delegators (struct target_ops *ops)
ops->to_thread_name = delegate_thread_name;
if (ops->to_rcmd == NULL)
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_can_async_p == NULL)
ops->to_can_async_p = delegate_can_async_p;
if (ops->to_is_async_p == NULL)
@@ -647,6 +662,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_extra_thread_info = tdefault_extra_thread_info;
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_can_async_p = find_default_can_async_p;
ops->to_is_async_p = find_default_is_async_p;
ops->to_async = tdefault_async;