aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 13:54:06 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:47:39 -0700
commita73047487749f2c4723f65fe633e24acdee28312 (patch)
treef6762572d0e64db881c02a97df93bac3a48ff8a9 /gdb
parent4229b31de20c8782f1b6d79a4dd304041ead26b7 (diff)
downloadbinutils-a73047487749f2c4723f65fe633e24acdee28312.zip
binutils-a73047487749f2c4723f65fe633e24acdee28312.tar.gz
binutils-a73047487749f2c4723f65fe633e24acdee28312.tar.bz2
convert to_supports_multi_process
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_supports_multi_process. * target.h (struct target_ops) <to_supports_multi_process>: Use TARGET_DEFAULT_RETURN.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/target-delegates.c16
-rw-r--r--gdb/target.c5
-rw-r--r--gdb/target.h3
4 files changed, 27 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fc14e48..73ffdf8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -2,6 +2,14 @@
* target-delegates.c: Rebuild.
* target.c (update_current_target): Don't inherit or default
+ to_supports_multi_process.
+ * target.h (struct target_ops) <to_supports_multi_process>: Use
+ TARGET_DEFAULT_RETURN.
+
+2014-02-19 Tom Tromey <tromey@redhat.com>
+
+ * target-delegates.c: Rebuild.
+ * target.c (update_current_target): Don't inherit or default
to_get_ada_task_ptid.
* target.h (struct target_ops) <to_get_ada_task_ptid>: Use
TARGET_DEFAULT_FUNC.
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index f92b096..3a322c1 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -591,6 +591,19 @@ delegate_execution_direction (struct target_ops *self)
return self->to_execution_direction (self);
}
+static int
+delegate_supports_multi_process (struct target_ops *self)
+{
+ self = self->beneath;
+ return self->to_supports_multi_process (self);
+}
+
+static int
+tdefault_supports_multi_process (struct target_ops *self)
+{
+ return 0;
+}
+
static struct gdbarch *
delegate_thread_architecture (struct target_ops *self, ptid_t arg1)
{
@@ -718,6 +731,8 @@ install_delegators (struct target_ops *ops)
ops->to_can_execute_reverse = delegate_can_execute_reverse;
if (ops->to_execution_direction == NULL)
ops->to_execution_direction = delegate_execution_direction;
+ if (ops->to_supports_multi_process == NULL)
+ ops->to_supports_multi_process = delegate_supports_multi_process;
if (ops->to_thread_architecture == NULL)
ops->to_thread_architecture = delegate_thread_architecture;
if (ops->to_supports_btrace == NULL)
@@ -779,6 +794,7 @@ install_dummy_methods (struct target_ops *ops)
ops->to_get_ada_task_ptid = default_get_ada_task_ptid;
ops->to_can_execute_reverse = tdefault_can_execute_reverse;
ops->to_execution_direction = default_execution_direction;
+ ops->to_supports_multi_process = tdefault_supports_multi_process;
ops->to_thread_architecture = default_thread_architecture;
ops->to_supports_btrace = tdefault_supports_btrace;
}
diff --git a/gdb/target.c b/gdb/target.c
index 083d6b5..bfa3635 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -685,7 +685,7 @@ update_current_target (void)
/* Do not inherit to_read_description. */
/* Do not inherit to_get_ada_task_ptid. */
/* Do not inherit to_search_memory. */
- INHERIT (to_supports_multi_process, t);
+ /* Do not inherit to_supports_multi_process. */
INHERIT (to_supports_enable_disable_tracepoint, t);
INHERIT (to_supports_string_tracing, t);
INHERIT (to_trace_init, t);
@@ -752,9 +752,6 @@ update_current_target (void)
(void (*) (struct target_ops *, ptid_t))
target_ignore);
current_target.to_read_description = NULL;
- de_fault (to_supports_multi_process,
- (int (*) (struct target_ops *))
- return_zero);
de_fault (to_supports_enable_disable_tracepoint,
(int (*) (struct target_ops *))
return_zero);
diff --git a/gdb/target.h b/gdb/target.h
index fc90a8b..390201d 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -713,7 +713,8 @@ struct target_ops
/* Does this target support debugging multiple processes
simultaneously? */
- int (*to_supports_multi_process) (struct target_ops *);
+ int (*to_supports_multi_process) (struct target_ops *)
+ TARGET_DEFAULT_RETURN (0);
/* Does this target support enabling and disabling tracepoints while a trace
experiment is running? */