Re: [PATCH/RFC] Add back the 'info proc mappings' command.

Daniel Jacobowitz
2001-12-23T21:12:20Z

On Fri, Dec 21, 2001 at 02:59:53PM -0800, Michael Snyder wrote:
>
> This adds back a sub-command ('mappings') of the "info proc"
> command, which was lost a couple years ago when procfs.c was
> rewritten. There are a bunch of other sub-commands that could
> also be added back in -- I just happened to need this one.
>
> I'll wait a week for objections before I check it in.
>
> 2001-12-21 Michael Snyder <msnyder@redhat.com>
>
> * procfs.c (info_proc_cmd): Add the 'mappings' sub-command that
> was dropped a few years ago, when procfs.c was rewritten.
> (info_proc_mappings): New function, implent 'info proc mappings'.
> (mappingflags): New function.
> (_initialize_procfs): Document new option to 'info proc' command.
>
> Index: procfs.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/procfs.c,v
> retrieving revision 1.32
> diff -c -3 -p -r1.32 procfs.c
> *** procfs.c 2001/07/07 21:55:28 1.32
> --- procfs.c 2001/12/21 22:57:30
> *************** proc_set_watchpoint (procinfo *pi, CORE_
> *** 2879,2889 ****
> * or zero.
> */
>
> - /* FIXME: it's probably a waste to cache this FD.
> - It doesn't get called that often... and if I open it
> - every time, I don't need to lseek it. */
> int
> ! proc_iterate_over_mappings (int (*func) (int, CORE_ADDR))
> {
> struct prmap *map;
> procinfo *pi;
> --- 2879,2886 ----
> * or zero.
> */
>
> int
> ! proc_iterate_over_mappings (int (*func) (int, CORE_ADDR)
> {
> struct prmap *map;
> procinfo *pi;

That's a typo, I think - you deleted a parenthesis. Did this compile?

Looks fine to me otherwise, FWIW.

--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer