This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb procfs.c ChangeLog
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 20 Apr 2010 22:35:59 -0000
- Subject: src/gdb procfs.c ChangeLog
CVSROOT: /cvs/src
Module name: src
Changes by: brobecke@sourceware.org 2010-04-20 22:35:59
Modified files:
gdb : procfs.c ChangeLog
Log message:
procfs.c: iterate_over_mappings callback has wrong profile.
The function proc_find_memory_regions calls iterate_over_mappings as
follow:
> return iterate_over_mappings (pi, func, data,
> find_memory_regions_callback);
The problem is that both func and find_memory_regions_callback
do not match the profile expected by iterate_over_mappings:
> iterate_over_mappings (procinfo *pi, int (*child_func) (), void *data,
> int (*func) (struct prmap *map,
> int (*child_func) (),
> void *data))
We cannot change proc_find_memory_regions such that FUNC is a pointer
to a function that takes no argument (in place of the 6 that it has).
This is because proc_find_memory_regions is used as a target_ops method.
However, it turns out that changing iterate_over_mappings to conform
to the profile imposed by the target_ops vector is possible without
much effort.
gdb/ChangeLog:
* 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.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/procfs.c.diff?cvsroot=src&r1=1.129&r2=1.130
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11652&r2=1.11653