From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9460 invoked by alias); 16 Mar 2009 20:37:04 -0000 Received: (qmail 9451 invoked by uid 22791); 16 Mar 2009 20:37:04 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Mar 2009 20:36:57 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LjJYJ-0006zx-Cf for gdb@sources.redhat.com; Mon, 16 Mar 2009 20:36:51 +0000 Received: from mobius.qnx.com ([209.226.137.108]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Mar 2009 20:36:51 +0000 Received: from aristovski by mobius.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Mar 2009 20:36:51 +0000 To: gdb@sources.redhat.com From: Aleksandar Ristovski Subject: Re: [RFC] stepping over permanent breakpoint Date: Mon, 16 Mar 2009 20:37:00 -0000 Message-ID: References: <200903161822.29862.pedro@codesourcery.com> <200903161938.13219.pedro@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) In-Reply-To: <200903161938.13219.pedro@codesourcery.com> 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-03/txt/msg00093.txt.bz2 Pedro Alves wrote: > > Not all architectures that run linux need PC adjustment. You're > thinking x86-linux. Anyway, I meant that you're breaking setting > a user breakpoint on top of a permanent breakpoint. Try > setting a breakpoint with "break *int3_addr", on top > of that int3, and running to it. When it is hit, you're moving > the PC passed it, so later calls to bpstat_stop_status like: > > /* See if there is a breakpoint at the current PC. */ > ecs->event_thread->stop_bpstat = bpstat_stop_status (stop_pc, ecs->ptid); > > ... will not see the permanent breakpoint, right? Hmm... very interesting. I am not seeing what you suggest (it works for me) but by looking at the code, I don't understand why - I agree it should be broken as you say, but for some reason it isn't. I will have to look into this a bit more (I am working in gdb 6.7). > > Mark's point about considering a trap instruction as a normal > instruction is valid, so I'm not sure if we'd want to do this > skipping by default or not. I'll let you guys fight > over it. :-) > Other than wanting to make gdb on qnx work, I have no strong feelings about one way or the other... It was a thought.