From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20422 invoked by alias); 29 Nov 2012 14:21:16 -0000 Received: (qmail 20411 invoked by uid 22791); 29 Nov 2012 14:21:14 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Nov 2012 14:21:09 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Te4zC-0004aZ-QJ from Luis_Gustavo@mentor.com ; Thu, 29 Nov 2012 06:21:06 -0800 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by svr-orw-fem-01.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 29 Nov 2012 06:21:06 -0800 Received: from [0.0.0.0] ([172.16.63.104]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 29 Nov 2012 06:21:06 -0800 Message-ID: <50B76F6A.5060802@codesourcery.com> Date: Thu, 29 Nov 2012 14:21:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Lightning/1.0b2 Thunderbird/3.1.20 MIME-Version: 1.0 To: Pedro Alves CC: gdb-patches@sourceware.org Subject: Re: [PATCH] Support targets that know how to step over breakpoints References: <506D859E.9050600@codesourcery.com> <507E99BB.8050105@codesourcery.com> <508FB2B6.6040006@codesourcery.com> <50B4DA35.3010206@codesourcery.com> <50B4E83D.9010507@redhat.com> In-Reply-To: <50B4E83D.9010507@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: 2012-11/txt/msg00862.txt.bz2 On 11/27/2012 02:20 PM, Pedro Alves wrote: > On 11/27/2012 03:20 PM, Luis Machado wrote: > >> Meanwhile i've updated this patch for the latest cvs head. >> >> I'm wondering if the patch is too ugly for someone to take a look at it or if it is too odd a feature to add. I suppose not. >> >> Hopefully i can get some traction with this new refreshed and shiny version! :-) > > I was hoping others could comment. :-) > > Last we discussed this (probably a years ago already), I expressed my > concern with upstreaming this as is. It's that this works by sending a regular > step command to the target, and then the target steps over any breakpoint that > may be at the current PC. If GDB is wanting to move past a breakpoint, this still > needs to do: > > -> vCont;s > <- T05 (step finished) > <- vCont;c > This seems suboptimal, though the outcome is the same. > An alternative would be to get rid of that T05, by defining new commands that > tell the target to step-over-breakpoint, or continue-over-breakpoint (and signal > variants). E.g., sbc to mean step-break-continue: If GDB knows the target supports stepping/continuing over breakpoints, should we bother with adding new commands at all? Or are we assuming "step over" means just single-stepping? In any case, the target can probably internally step over such a breakpoint before effectively continuing in response to a vCont;c packet. What do you think? We would then get rid of both the vCont;s and the T05 response. > > -> vCont;spc > > That'd move past the breakpoint without causing a stop immediately. > > Guess I need to convince myself the current design is good enough. Comments? > Though suboptimal, the design seems to do the job without being ugly. That said, the vCont;c case could be addressed for a cleaner feature. But i think new commands are a little too much. Testing this is also a problem i'm worried about. We can't reliably test this (and other) features that are not properly supported by gdbserver, but i suppose this is a different discussion. Luis