Subject: Re: gcore! Where'd it go? ...and docs for procfs?
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: current-users
Date: 02/14/2000 06:27:02
In article <20000214010157.A11592@rek.tjls.com>,
Thor Lancelot Simon <tls@rek.tjls.com> wrote:
>On Sun, Feb 13, 2000 at 02:22:15PM -0800, Greywolf wrote:
>> I haven't had call to use gcore for over twelve years now.
>> Imagine my surprise when I found that NetBSD does not have such a program
>> in its core tree!
>
>It's not too surprising.  The 4.4BSD gcore knew about things like VAX
>pagetables (and nothing else).
>
>I meant to move it into a syscall, but it was harder than I thought and
>then I got distracted.  I think pk meant to do something about it at
>one point, too.

Isn't it as simple as adding a ptrace(PT_COREDUMP,...) and calling
coredump() in it?

>What do you need gcore for that you can't do with an attachable
>debugger?

If you are stuck in D state you cannot attach a debugger and do
anything useful with it.

christos