From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6979 invoked by alias); 19 Aug 2003 19:13:02 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6971 invoked from network); 19 Aug 2003 19:13:02 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 19 Aug 2003 19:13:02 -0000 Received: from drow by nevyn.them.org with local (Exim 4.20 #1 (Debian)) id 19pBue-0006OG-Tl; Tue, 19 Aug 2003 15:13:00 -0400 Date: Tue, 19 Aug 2003 19:13:00 -0000 From: Daniel Jacobowitz To: Kevin Buettner Cc: Jimi Xenidis , gdb-patches@sources.redhat.com, Andrew Cagney Subject: Re: Powerpc and software single step Message-ID: <20030819191300.GA24336@nevyn.them.org> Mail-Followup-To: Kevin Buettner , Jimi Xenidis , gdb-patches@sources.redhat.com, Andrew Cagney References: <16185.27333.689024.383508@kitch0.watson.ibm.com> <1030819175512.ZM31220@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1030819175512.ZM31220@localhost.localdomain> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-08/txt/msg00322.txt.bz2 On Tue, Aug 19, 2003 at 10:55:13AM -0700, Kevin Buettner wrote: > On Aug 12, 6:31pm, Jimi Xenidis wrote: > > > The AIX kernel does not support single step but the Linux kernel does. > > > > However, I am working with a remote machine level debugger for PowerPC > > that allows me to debug a running Linux kernel and cannot support > > single stepping. For this I require that when debugging a Linux > > target I need to turn on SOFTWARE_SINGLE_STEP. > > > > I would like to add this to an "obscure" setting that will turn it on > > even under Linux. > > Here is the patch.. please accept, feel free to mangle the symbol > > names to taste. > > The patch looks mostly okay to me. I do have some comments and questions > though... > > 1) It is customary to provide ChangeLog entries with patch submissions. > > 2) Why is ``ppc_linux_single_step_mode'' an extern in tm-linux.h? I > would really prefer that it be local to ppc-linux-tdep.c. If > there's some compelling reason for it to not be local, then we can > discuss adding it to ppc-tdep.h. Could we do this slightly differently? SOFTWARE_SINGLE_STEP_P is used in two non-platform-specific files: infptrace.c for a sanity check, and infrun.c. In infrun, the only line which matters for this case is in resume: if (SOFTWARE_SINGLE_STEP_P () && step) Why not add a hook to check there which lets the user use software single step? It'll require playing with the target macros; we'd need something like: SOFTWARE_SINGLE_STEP - perform software single step SOFTWARE_SINGLE_STEP_P - SOFTWARE_SINGLE_STEP available SOFTWARE_SINGLE_STEP_ONLY_P - no hardware singlestep available (check that in infptrace instead of SOFTWARE_SINGLE_STEP_P?) I've wanted to flip back and forth at runtime before. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer