[PATCH] Let gcore use ptrace interface rather than the procfs

Attilio Rao attilio at freebsd.org
Thu Nov 19 01:33:03 UTC 2009


2009/11/17 Robert N. M. Watson <rwatson at freebsd.org>:
>
> On 17 Nov 2009, at 14:17, Ed Maste wrote:
>
>> Our original motivation for doing this was to make gcore work with
>> threaded apps, not avoiding procfs, but that's a useful side-effect of
>> the work.  Note though that for that purpose it isn't complete; procfs
>> is still used in readmap to read the process' memory map.  It looks like
>> we need to find a way to implement readmap without procfs.
>
> Are the sysctls used for procstat -v sufficient for this purpose?

This patch should address the arised concerns by both of you:
http://www.freebsd.org/~attilio/Sandvine/STABLE_8/gcore/gcore2.diff

and additively fix elf_getstatus() to not use procfs, so that gcore is
completely procfs independent now.
Comments, reviews and testing are welcome.

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein


More information about the freebsd-current mailing list