From 2e73927ca515996146d2b20d8e6f0b39c0a51b29 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 17 Dec 2013 21:35:39 -0700 Subject: Add target_ops argument to to_find_memory_regions 2014-02-19 Tom Tromey * target.h (struct target_ops) : Add argument. (target_find_memory_regions): Add argument. * target.c (dummy_find_memory_regions): Add 'self' argument. * procfs.c (proc_find_memory_regions): Add 'self' argument. * gnu-nat.c (gnu_find_memory_regions): Add 'self' argument. * fbsd-nat.h (fbsd_find_memory_regions): Add 'self' argument. * fbsd-nat.c (fbsd_find_memory_regions): Add 'self' argument. * exec. (exec_do_find_memory_regions): New global. (exec_set_find_memory_regions): Rewrite. (exec_find_memory_regions): New function. (init_exec_ops): Use exec_find_memory_regions. --- gdb/procfs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/procfs.c') diff --git a/gdb/procfs.c b/gdb/procfs.c index 575984c..360a515 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -137,7 +137,8 @@ static int procfs_thread_alive (struct target_ops *ops, ptid_t); static void procfs_find_new_threads (struct target_ops *ops); static char *procfs_pid_to_str (struct target_ops *, ptid_t); -static int proc_find_memory_regions (find_memory_region_ftype, void *); +static int proc_find_memory_regions (struct target_ops *self, + find_memory_region_ftype, void *); static char * procfs_make_note_section (bfd *, int *); @@ -5058,7 +5059,8 @@ find_memory_regions_callback (struct prmap *map, the callback. */ static int -proc_find_memory_regions (find_memory_region_ftype func, void *data) +proc_find_memory_regions (struct target_ops *self, + find_memory_region_ftype func, void *data) { procinfo *pi = find_procinfo_or_die (ptid_get_pid (inferior_ptid), 0); -- cgit v1.1