This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
garbage collect proc_iterate_over_mappings.
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 7 Jun 2009 19:02:12 +0100
- Subject: garbage collect proc_iterate_over_mappings.
Just noticed this declared on inferior.h. Nothing uses it, so,
let's put it in the trash bin.
Checked in.
--
Pedro Alves
2009-06-07 Pedro Alves <pedro@codesourcery.com>
* inferior.h (proc_iterate_over_mappings): Delete declaration.
* nto-tdep.h (proc_iterate_over_mappings): Delete declaration.
* procfs.c (proc_iterate_over_mappings): Delete.
---
gdb/inferior.h | 2 --
gdb/nto-tdep.h | 2 --
gdb/procfs.c | 25 -------------------------
3 files changed, 29 deletions(-)
Index: src/gdb/inferior.h
===================================================================
--- src.orig/gdb/inferior.h 2009-05-25 13:45:59.000000000 +0100
+++ src/gdb/inferior.h 2009-06-07 18:50:03.000000000 +0100
@@ -198,8 +198,6 @@ extern void terminal_init_inferior_with_
/* From procfs.c */
-extern int proc_iterate_over_mappings (int (*)(int, CORE_ADDR));
-
extern ptid_t procfs_first_available (void);
/* From fork-child.c */
Index: src/gdb/nto-tdep.h
===================================================================
--- src.orig/gdb/nto-tdep.h 2009-05-25 13:46:00.000000000 +0100
+++ src/gdb/nto-tdep.h 2009-06-07 18:50:03.000000000 +0100
@@ -147,8 +147,6 @@ void nto_set_target(struct nto_target_op
char **nto_parse_redirection (char *start_argv[], const char **in,
const char **out, const char **err);
-int proc_iterate_over_mappings (int (*func) (int, CORE_ADDR));
-
void nto_relocate_section_addresses (struct so_list *,
struct target_section *);
Index: src/gdb/procfs.c
===================================================================
--- src.orig/gdb/procfs.c 2009-05-25 13:46:00.000000000 +0100
+++ src/gdb/procfs.c 2009-06-07 18:50:03.000000000 +0100
@@ -5524,31 +5524,6 @@ int solib_mappings_callback (struct prma
}
/*
- * Function: proc_iterate_over_mappings
- *
- * Uses the unified "iterate_over_mappings" function
- * to implement the exported interface to solib-svr4.c.
- *
- * Given a pointer to a function, call that function once for every
- * mapped address space in the process. The callback function
- * receives an open file descriptor for the file corresponding to
- * that mapped address space (if there is one), and the base address
- * of the mapped space. Quit when the callback function returns a
- * nonzero value, or at teh end of the mappings.
- *
- * Returns: the first non-zero return value of the callback function,
- * or zero.
- */
-
-int
-proc_iterate_over_mappings (int (*func) (int, CORE_ADDR))
-{
- procinfo *pi = find_procinfo_or_die (PIDGET (inferior_ptid), 0);
-
- return iterate_over_mappings (pi, func, pi, solib_mappings_callback);
-}
-
-/*
* Function: find_memory_regions_callback
*
* Implements the to_find_memory_regions method.