From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81987 invoked by alias); 2 Apr 2015 09:09:34 -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 81977 invoked by uid 89); 2 Apr 2015 09:09:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.17.22) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 02 Apr 2015 09:09:32 +0000 Received: from licht.localdomain ([62.158.15.224]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MCOdh-1Ym9iO3Y6z-009B38; Thu, 02 Apr 2015 11:09:26 +0200 Received: from licht.localdomain (localhost.localdomain [127.0.0.1]) by licht.localdomain (8.12.8/8.12.8) with ESMTP id t3299Mah015588; Thu, 2 Apr 2015 11:09:23 +0200 Received: (from pes@localhost) by licht.localdomain (8.12.8/8.12.8/Submit) id t3299MbW015585; Thu, 2 Apr 2015 11:09:22 +0200 From: Peter Schauer Message-Id: <201504020909.t3299MbW015585@licht.localdomain> Subject: Re: [rfc, spu] Don't call set_gdbarch_cannot_step_breakpoint in spu_gdbarch_init To: palves@redhat.com (Pedro Alves) Date: Thu, 02 Apr 2015 09:09:00 -0000 Cc: qiyaoltc@gmail.com (Yao Qi), gdb-patches@sourceware.org, uweigand@de.ibm.com (Ulrich Weigand) In-Reply-To: <551D04AC.7000206@redhat.com> from "Pedro Alves" at Apr 02, 2015 09:58:20 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-UI-Out-Filterresults: notjunk:1; X-SW-Source: 2015-04/txt/msg00099.txt.bz2 > 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. > > 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. > Ulrich, any idea why cannot_step_breakpoint was ever needed > for the SPU? > > Thanks, > Pedro Alves -- Peter Schauer Peter.Schauer@mytum.de