Subject: Re: building libkvm
To: Ben Harris <bjh21@netbsd.org>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm
Date: 07/12/2001 15:04:02
> Well, yes.  It's obvious that (1) is wrong.  The question is basically how
> to do (2).  The easiest is to follow other ports, use the value of
> __ps_strings to find the top of the user's stack, and assume that zero is
> as good a guess at the bottom of user memory as any.  If we feel like
> being fancy, we could get sysctl to return the correct values, but that
> will still leave holes (e.g. 26-bit processes on a 32-bit system, or
> debugging arm26 crash dumps on an arm32 system), so I'd go for the easy
> solution.

We should only guess when we can't determine things exactly.  For a live 
system, I still think we should be using sysctl(3), or something directly 
equivalent to get the official answers from the kernel.  I assume here 
that libkvm can tell the difference between operating on a live system and 
operating on a dump.

R.