Subject: Re: CVS commit: src/sys/arch/alpha
To: Christos Zoulas <christos@zoulas.com>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: source-changes
Date: 09/19/2003 09:11:31
On Friday, September 19, 2003, at 04:56 AM, Christos Zoulas wrote:
>> From an API perspective, it is nice if ptrace was more consistent
> across platforms, and provided expected functionality. Otherwise,
> each client program would have to provide this functionality and
> this does not seem right from a maintainance point of view. What
> is the technical reason that this does not belong in the kernel?
> What if we had two debuggers? Wouldn't we have to dup all the code?
The "consistent API" thing is nonsense ... PT_STEP is specifically
documented as "not available on all machine architectures" (along with
PT_{GET,SET}REGS and PT_{GET,SET}FPREGS).
The technical reason is simple: The Alpha hardware does not support
single-stepping, and thus PT_STEP should not be implemented. Your
hypothetical debugger has to implement single-stepping functionality
anyway, because PT_STEP isn't available for kernel debugging.
Also note that Alpha is not the only platform that does not provide
PT_STEP.
-- Jason R. Thorpe <thorpej@wasabisystems.com>