From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11237 invoked by alias); 25 Apr 2006 21:02:06 -0000 Received: (qmail 11229 invoked by uid 22791); 25 Apr 2006 21:02:05 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 25 Apr 2006 21:02:02 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FYUfY-0000K8-UF; Tue, 25 Apr 2006 17:02:01 -0400 Date: Tue, 25 Apr 2006 21:02:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb-patches@sourceware.org Subject: Re: single-step breakpoints Message-ID: <20060425210200.GA1153@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gdb-patches@sourceware.org References: <200604252039.k3PKdaZ5020227@elgar.sibelius.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200604252039.k3PKdaZ5020227@elgar.sibelius.xs4all.nl> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes 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/msg00341.txt.bz2 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(). -- Daniel Jacobowitz CodeSourcery