Subject: Re: kernel stack traces for other processes?
To: None <mycroft@gnu.ai.mit.edu>
From: John Kohl <jtk@atria.com>
List: port-i386
Date: 09/27/1994 09:07:22
>>>>> "CH" == Charles M Hannum <mycroft@gnu.ai.mit.edu> writes:
CH> Really, DDB ought to have some sort of `switch' command. There are
CH> some issues about interrupt handlers to consider when implementing
CH> this, however. The simplest approach seems like it would be to simply
CH> wake up the process, put it at a high priority (which should get reset
CH> on the next scheduler scan), and register an AST in the current
CH> process to force a switch. Then have a trap in cpu_switch() itself to
CH> reenter the debugger.
This seems like overkill, unless all the kernel stacks are mapped to the
same address. (Are they? I haven't looked inside the kernel's VM
layout for i386). Couldn't DDB just be taught how to trace back a call
chain given a stack pointer? Then it shouldn't be too hard to teach ddb
how to find the %esp for an arbitrary process.
==John