From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [POWERPC 2/9] spufs: always send sigtrap on breakpoint From: Luke Browning To: Arnd Bergmann In-Reply-To: <20061127182429.882511000@arndb.de> References: <20061127181851.796747000@arndb.de> <20061127182429.882511000@arndb.de> Content-Type: text/plain Date: Mon, 27 Nov 2006 22:12:15 -0200 Message-Id: <1164672736.3683.10.camel@localhost> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org, Ulrich Weigand , Arnd Bergmann , cbe-oss-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2006-11-27 at 19:18 +0100, Arnd Bergmann wrote: > plain text document attachment > (spufs-always-sigtrap-on-breakpoint.diff) > Currently, we only send a sigtrap if the current task is being ptraced. > This is somewhat inconsistant, and it breaks utrace support in fedora. > Removing the check should do the right thing in all cases. > > Cc: Ulrich Weigand > Signed-off-by: Arnd Bergmann > > diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c > index 1be4e33..1acc2ff 100644 > --- a/arch/powerpc/platforms/cell/spufs/run.c > +++ b/arch/powerpc/platforms/cell/spufs/run.c > @@ -350,12 +350,10 @@ out2: > (status >> SPU_STOP_STATUS_SHIFT != 0x2104))))) > ret = status; > > - if (unlikely(current->ptrace & PT_PTRACED)) { > - if ((status & SPU_STATUS_STOPPED_BY_STOP) > - && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) { > - force_sig(SIGTRAP, current); > - ret = -ERESTARTSYS; > - } > + if ((status & SPU_STATUS_STOPPED_BY_STOP) > + && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) { > + force_sig(SIGTRAP, current); > + ret = -ERESTARTSYS; > } > > out: > 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? Luke