From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10245 invoked by alias); 2 Feb 2009 21:49:23 -0000 Received: (qmail 10237 invoked by uid 22791); 2 Feb 2009 21:49:23 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Feb 2009 21:49:18 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 58779107F4 for ; Mon, 2 Feb 2009 21:49:16 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 41D3810781 for ; Mon, 2 Feb 2009 21:49:16 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LU6fL-0001B6-IW for gdb@sourceware.org; Mon, 02 Feb 2009 16:49:15 -0500 Date: Mon, 02 Feb 2009 21:49:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org Subject: Re: i386 int3 handling, running vs stepping Message-ID: <20090202214915.GA4257@caradoc.them.org> Mail-Followup-To: gdb@sourceware.org References: <20090201231819.A9FB61C7A19@localhost> <20090201233251.GA27142@caradoc.them.org> <20090202042459.GA10080@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00023.txt.bz2 On Mon, Feb 02, 2009 at 12:03:13PM -0800, Doug Evans wrote: > On Sun, Feb 1, 2009 at 8:24 PM, Daniel Jacobowitz wrote: > > On Sun, Feb 01, 2009 at 03:38:04PM -0800, Doug Evans wrote: > >> I haven't looked into siginfo, but can gdb look at the insn? [akin to > >> displaced stepping handling] > > > > I suppose, but I don't really see a point. > > Apologies, it's not clear what point you're referring to. > > I guess the issue is whether int3's in programs are supported by gdb, > and by supported I mean users can rely on gdb flagging a SIGTRAP when > they're executed. As you say, there are people who take advantage of > this for hardwired breakpoints. Since it works today, and we know that people use it, I think we have no choice but to consider it supported. > There are various situations where gdb itself will singlestep code > (e.g., "step", "next", s/w watchpoints). Can users expect to see the > SIGTRAP in these situations (and all others)? And if the program is > being run by a script, can the script expect to see the SIGTRAP in all > cases? That's certainly not the case today. If you want to make it work, and add a couple of tests for it, I've no objection - it seems a plausible thing to do. But I would prefer that any solution did not involve reading the instruction at every step; that's quite slow, on a target where we otherwise do not need to. -- Daniel Jacobowitz CodeSourcery