aboutsummaryrefslogtreecommitdiff
path: root/gdb/target-delegates.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 10:55:34 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:47:31 -0700
commit0b5a271985687f3cfaf22a301e5ad4600df1302b (patch)
treeb5b606d4440dbb483e9bdede2c55f7642e451657 /gdb/target-delegates.c
parentd9cb019581e7934faa292b5f9d0caa62be0ceef0 (diff)
downloadgdb-0b5a271985687f3cfaf22a301e5ad4600df1302b.zip
gdb-0b5a271985687f3cfaf22a301e5ad4600df1302b.tar.gz
gdb-0b5a271985687f3cfaf22a301e5ad4600df1302b.tar.bz2
convert to_find_memory_regions
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (update_current_target): Don't inherit or default to_find_memory_regions. (init_dummy_target): Don't initialize to_find_memory_regions. * target.h (struct target_ops) <to_find_memory_regions>: Use TARGET_DEFAULT_FUNC.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r--gdb/target-delegates.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c
index 600e64e..301b07a 100644
--- a/gdb/target-delegates.c
+++ b/gdb/target-delegates.c
@@ -511,6 +511,13 @@ tdefault_async (struct target_ops *self, async_callback_ftype *arg1, void *arg2)
tcomplain ();
}
+static int
+delegate_find_memory_regions (struct target_ops *self, find_memory_region_ftype arg1, void *arg2)
+{
+ self = self->beneath;
+ return self->to_find_memory_regions (self, arg1, arg2);
+}
+
static enum target_xfer_status
delegate_xfer_partial (struct target_ops *self, enum target_object arg1, const char *arg2, gdb_byte *arg3, const gdb_byte *arg4, ULONGEST arg5, ULONGEST arg6, ULONGEST *arg7)
{
@@ -628,6 +635,8 @@ install_delegators (struct target_ops *ops)
ops->to_is_async_p = delegate_is_async_p;
if (ops->to_async == NULL)
ops->to_async = delegate_async;
+ if (ops->to_find_memory_regions == NULL)
+ ops->to_find_memory_regions = delegate_find_memory_regions;
if (ops->to_xfer_partial == NULL)
ops->to_xfer_partial = delegate_xfer_partial;
if (ops->to_supports_btrace == NULL)
@@ -681,6 +690,7 @@ install_dummy_methods (struct target_ops *ops)
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;
+ ops->to_find_memory_regions = dummy_find_memory_regions;
ops->to_xfer_partial = tdefault_xfer_partial;
ops->to_supports_btrace = tdefault_supports_btrace;
}