Subject: Re: Questions about RAS and debuggers.
To: Matt Thomas <matt@3am-software.com>
From: Gregory McGarry <g.mcgarry@ieee.org>
List: tech-kern
Date: 02/25/2003 12:20:45
Matt Thomas wrote:

> I'm looking at implementing restartable atomic sequences for
> PowerPC but I ran into a few issues that need clarification.
> 
> The first is what happends if a trap happens withing a RAS
> that's supposed to invoke the debugger?  Do I dismiss the
> trap?  Ignore the breakpoint?  kill the process?  What if
> someone issue a trap instruction (breakpoint) while inside
> a RAS?  ignore the breakpoint?

The discussion in ras(9) is a little sparse.

The ptrace(2) interface was changed so that breakpoints cannot be set
within a RAS.  On i386 and m68k any breakpoints inside a RAS (say,
from ddb) are dismissed until the first instruction after the
breakpoint.  On MIPS, ddb will set the breakpoint to the first
instruction after the RAS.  Killing the process might be a good option
though.  Other traps should be fine to service.

Does that answer your questions adequately?

	-- Gregory McGarry <g.mcgarry@ieee.org>