+2010-04-20 Joel Brobecker <brobecker@adacore.com>
+
+ * procfs.c (iterate_over_mappings_cb_ftype): New typedef.
+ (iterate_over_mappings): Adjust function profile. Add declaration.
+ (insert_dbx_link_bpt_in_region, info_mappings_callback):
+ Adjust accordingly.
+
2010-04-20 Joel Brobecker <brobecker@adacore.com>
* procfs.c (solib_mappings_callback): Move function up to avoid
static int find_syscall (procinfo *pi, char *name);
#endif /* DYNAMIC_SYSCALLS */
+/* A function type used as a callback back iterate_over_mappings. */
+typedef int (iterate_over_mappings_cb_ftype)
+ (CORE_ADDR vaddr, unsigned long size, int read, int write, int execute,
+ void *data);
+
+static int iterate_over_mappings
+ (procinfo *pi,
+ iterate_over_mappings_cb_ftype *child_func,
+ void *data,
+ int (*func) (struct prmap *map,
+ iterate_over_mappings_cb_ftype *child_func,
+ void *data));
+
/* The head of the procinfo list: */
static procinfo * procinfo_list;
static int
insert_dbx_link_bpt_in_region (struct prmap *map,
- int (*child_func) (),
+ iterate_over_mappings_cb_ftype *child_func,
void *data)
{
procinfo *pi = (procinfo *) data;
*/
static int
-iterate_over_mappings (procinfo *pi, int (*child_func) (), void *data,
+iterate_over_mappings (procinfo *pi,
+ iterate_over_mappings_cb_ftype *child_func,
+ void *data,
int (*func) (struct prmap *map,
- int (*child_func) (),
+ iterate_over_mappings_cb_ftype *child_func,
void *data))
{
char pathname[MAX_PROC_NAME_SIZE];
*/
static int
-info_mappings_callback (struct prmap *map, int (*ignore) (), void *unused)
+info_mappings_callback (struct prmap *map,
+ iterate_over_mappings_cb_ftype *ignore,
+ void *unused)
{
unsigned int pr_off;