From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123683 invoked by alias); 2 Apr 2015 09:38:54 -0000 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 Received: (qmail 123658 invoked by uid 89); 2 Apr 2015 09:38:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 02 Apr 2015 09:38:52 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t329chlR030820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 2 Apr 2015 05:38:43 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t329cfOE012407; Thu, 2 Apr 2015 05:38:42 -0400 Message-ID: <551D0E21.7080500@redhat.com> Date: Thu, 02 Apr 2015 09:38:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Peter Schauer CC: Yao Qi , gdb-patches@sourceware.org, Ulrich Weigand Subject: Re: [rfc, spu] Don't call set_gdbarch_cannot_step_breakpoint in spu_gdbarch_init References: <201504020909.t3299MbW015585@licht.localdomain> In-Reply-To: <201504020909.t3299MbW015585@licht.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-04/txt/msg00100.txt.bz2 On 04/02/2015 10:09 AM, Peter Schauer wrote: >> On 04/01/2015 09:35 PM, Peter Schauer wrote: >> >>> This was needed for alpha OSF/1. >>> >>> Back then it was the only architecture which would not ptrace step >>> over an inserted breakpoint, causing an infinite loop while trying >>> to single step over an inserted breakpoint. >> >> OOC, do you recall whether the infinite loop was that the step didn't >> make progress, and gdb would continuously issue a single-step forever, >> or whether the infinite loop was all in the kernel? > > The step didn't make progress and GDB would have continuously issued > a single-step forever. OK, thanks. > >>> The diff back then was >>> >>> + #ifdef CANNOT_STEP_BREAKPOINT >>> + /* If the target doesn't support stepping over a breakpoint, simply >>> + continue, we will then hit the breakpoint anyway. */ >>> + if (step && breakpoints_inserted && breakpoint_here_p (read_pc ())) >>> + step = 0; >>> + #endif >>> >>> I do not know if GDB ever tries to ptrace step over an inserted >>> breakpoint nowadays, sorry. >> >> It does in some cases when we have a signal to deliver at the >> same time we are trying to step over a breakpoint. Look for >> "signal arrived while stepping over" in infrun.c. > > Yeah, that was also the reason why we had to keep the breakpoint > inserted back then. > >>> Meanwhile the alpha OSF/1 port is dead anyways... >> >> The setting ended up done for all alpha ports today though, in: >> >> alpha-tdep.c: set_gdbarch_cannot_step_breakpoint (gdbarch, 1); >> >> OSF/1 is gone, but we still support Alpha GNU/Linux, which is also >> taking that code path,. If this was OSF/1 specific, then we could >> get rid of that too, and then get rid of gdbarch_cannot_step_breakpoint >> completely. Anyone have access to Alpha GNU/Linux to try that out? > > If it really happens on Alpha GNU/Linux, we could request a fix from the > kernel folks and phase out this ugly gdbarch_cannot_step_breakpoint hack > slowly. Yeah. I think the hack is probably breaking the case of nested signals while stepping over a breakpoint (gdb.base/signest.exp), as nothing is forcing the insertion of breakpoints when the hack triggers. If needed, it should probably be merged with the code below for software-step targets: /* Currently, our software single-step implementation leads to different results than hardware single-stepping in one situation: when stepping into delivering a signal which has an associated signal handler, hardware single-step will stop at the first instruction of the handler, while software single-step will simply skip execution of the handler. ... Thanks, Pedro Alves