From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Date: Thu, 28 Jan 2016 21:33:21 +0000 Subject: Re: [PATCH 30/31] Add debugger entry points for SPARC Message-Id: <20160128213321.GA32054@ravnborg.org> List-Id: References: <1454010468-29651-1-git-send-email-jeffmerkey@gmail.com> In-Reply-To: <1454010468-29651-1-git-send-email-jeffmerkey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jeffrey Merkey Cc: linux-kernel@vger.kernel.org, davem@davemloft.net, linux.mdb@gmail.com, sparclinux@vger.kernel.org Hi Jeff. > +++ b/arch/sparc/include/asm/kdebug.h > @@ -5,4 +5,9 @@ > #else > #include > #endif > + > +static inline void arch_breakpoint(void) > +{ > + asm("ta $0x7d"); > +} > #endif There seems to be some debugger infrastructure present already for kgdb, but I assume this cannot be used. Anyway - trap 0x7d is a debugger trap in sparc32. If CONFIG_KGDB is not defined then 0x7d is just a regular BAD_TRAP. For sparc64 trap 0x7d is something different. I did not conclude what was the right choice for neither. Sam From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161306AbcA1Vjf (ORCPT ); Thu, 28 Jan 2016 16:39:35 -0500 Received: from asavdk3.altibox.net ([109.247.116.14]:43482 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933837AbcA1Vjd (ORCPT ); Thu, 28 Jan 2016 16:39:33 -0500 X-Greylist: delayed 356 seconds by postgrey-1.27 at vger.kernel.org; Thu, 28 Jan 2016 16:39:32 EST Date: Thu, 28 Jan 2016 22:33:21 +0100 From: Sam Ravnborg To: Jeffrey Merkey Cc: linux-kernel@vger.kernel.org, davem@davemloft.net, linux.mdb@gmail.com, sparclinux@vger.kernel.org Subject: Re: [PATCH 30/31] Add debugger entry points for SPARC Message-ID: <20160128213321.GA32054@ravnborg.org> References: <1454010468-29651-1-git-send-email-jeffmerkey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454010468-29651-1-git-send-email-jeffmerkey@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=VPZ9547X c=1 sm=1 tr=0 a=Ij76tQDYWdb01v2+RnYW5w==:117 a=Ij76tQDYWdb01v2+RnYW5w==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=DyMca5HCiwmcNczaiVYA:9 a=CjuIK1q_8ugA:10 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jeff. > +++ b/arch/sparc/include/asm/kdebug.h > @@ -5,4 +5,9 @@ > #else > #include > #endif > + > +static inline void arch_breakpoint(void) > +{ > + asm("ta $0x7d"); > +} > #endif There seems to be some debugger infrastructure present already for kgdb, but I assume this cannot be used. Anyway - trap 0x7d is a debugger trap in sparc32. If CONFIG_KGDB is not defined then 0x7d is just a regular BAD_TRAP. For sparc64 trap 0x7d is something different. I did not conclude what was the right choice for neither. Sam