From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19883 invoked by alias); 24 Jun 2008 20:22:13 -0000 Received: (qmail 19875 invoked by uid 22791); 24 Jun 2008 20:22:12 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Jun 2008 20:21:51 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 1D7303BF71; Tue, 24 Jun 2008 13:21:50 -0700 (PDT) Subject: Re: [RFA] set/show enable-software-singlestep From: Michael Snyder To: Pedro Alves Cc: gdb-patches@sourceware.org In-Reply-To: <200806242107.22651.pedro_alves@portugalmail.pt> References: <1214331534.3601.1211.camel@localhost.localdomain> <200806242107.22651.pedro_alves@portugalmail.pt> Content-Type: text/plain Date: Wed, 25 Jun 2008 06:15:00 -0000 Message-Id: <1214338906.3601.1242.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-7.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00421.txt.bz2 On Tue, 2008-06-24 at 21:07 +0100, Pedro Alves wrote: > A Tuesday 24 June 2008 19:18:54, Michael Snyder wrote: > > There may be cases where gdb would be inclined to use > > software singlestep, but you might not want it to. Examples: > > I understand you want this for reverse debugging, so let me ask: > > > * "target remote" to a target such as a simulator that > > would be able to support normal singlestep. > > Should the support be reported by the stub instead?, as in: > > Can the target (stub/debug api) do single-stepping? Yes, cool. > No? Bummer, will have to do software-singlestepping > on the GDB's side. Yes, that would certainly be cool -- automate the choice. At the moment, I don't know of any stub that can report that capability, so I'd like to be able to do it explicitly. > E.g, another similar issue with displaced stepping: > (hey you just touched that option :-) ) Yes, I was noticing that! Sounds like a cool capability. > I'm working with a target that supports stepping > off breakpoints on the stub side. I was thinking of: > > Can the target (stub/debug api) step over breakpoints for me? > Yes, cool. No? Bummer, will have to do displaced-stepping > on the GDB's side. > > > * reverse debugging, where you can't predict the > > "come-from" address of a jump instruction. > > Should software-singlestepping *always* be disabled > while doing a reverse debug? If so, why do we need the > command? Shouldn't it be enforced in the code? Possibly. I haven't gotten that far along in my thinking. Just seemed like a reasonable starting point was to be able to set it by hand. And as I said, there might be other cases where you'd like to do this other than reverse debugging.