[POWERPC 2/9] spufs: always send sigtrap on breakpoint

Arnd Bergmann arnd at arndb.de
Tue Nov 28 11:29:21 EST 2006


On Tuesday 28 November 2006 01:12, Luke Browning wrote:
> 
> Arnd, could you explain this change a little bit more.  Don't you have
> to consider whether the program is setup to receive SIGTRAP.  We know it
> is code to handle SIGTRAP if it is ptraced.  Or, are you asserting that
> at this point the spu has hit a trap instruction?  What does 0x3fff
> mean?

0x3fff is indeed the code returned from the breakpoint instruction,
as specified in the JSRE list of stop-and-signal codes. The behaviour
is consistant with that of a Linux process entering a breakpoint.
This usually only happens while ptracing a task, but there is no
reason to treat a task differently when it's not being traced.

It could even be used as well-defined way for an application to
create a core dump, similar to abort() in posix.

	Arnd <><



More information about the Linuxppc-dev mailing list