From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19432 invoked by alias); 25 Apr 2006 21:55:15 -0000 Received: (qmail 19423 invoked by uid 22791); 25 Apr 2006 21:55:15 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Apr 2006 21:55:13 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k3PLsdpH005727; Tue, 25 Apr 2006 23:54:39 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k3PLscCC031418; Tue, 25 Apr 2006 23:54:38 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k3PLscQe005675; Tue, 25 Apr 2006 23:54:38 +0200 (CEST) Date: Tue, 25 Apr 2006 21:55:00 -0000 Message-Id: <200604252154.k3PLscQe005675@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb-patches@sourceware.org In-reply-to: <20060425210200.GA1153@nevyn.them.org> (message from Daniel Jacobowitz on Tue, 25 Apr 2006 17:02:00 -0400) Subject: Re: single-step breakpoints References: <200604252039.k3PKdaZ5020227@elgar.sibelius.xs4all.nl> <20060425210200.GA1153@nevyn.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00342.txt.bz2 > Date: Tue, 25 Apr 2006 17:02:00 -0400 > From: Daniel Jacobowitz > > On Tue, Apr 25, 2006 at 10:39:36PM +0200, Mark Kettenis wrote: > > Hi Daniel, > > > > There a slight problem with insert_single_step_breakpoint() and > > remove_single_step_breakpoints(). On OpenBSD, inserting a breakpoint > > into the kernel-provided signal trampoline, may fail. Unfortunately, > > the caller of insert_single_step_breakpoint() never notices this, and > > calls remove_single_step_breakpoints() to remove the breakpoints. > > Unfortunately that makes us hit the gdb_assert() in there. > > > > This patch makes us avoid this while still making an attempt to catch > > misuse of the interface. > > Hmm - this is also true on some GNU/Linux targets, although none that > use software single step (yet - though I think I know how to trigger it > on ARM, some kernel fixes would also be needed). > > My question is, is there something more useful we could be doing? > If the single step breakpoint fails, then continuing will make us lose > control. Maybe it should be an error(). That may not be such a bad idea. But we'll need to adjust gdb.base/sigbpt.exp since it will end up in an infinite loop trying to step the target. I'll look a bit more into it later this week. Need to get some sleep now. Mark