From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22752 invoked by alias); 3 Nov 2005 21:25:52 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 22691 invoked by uid 22791); 3 Nov 2005 21:25:49 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 03 Nov 2005 21:25:49 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1EXmag-00036s-Ph; Thu, 03 Nov 2005 16:25:46 -0500 Date: Thu, 03 Nov 2005 21:25:00 -0000 From: Daniel Jacobowitz To: Efim Monjak Cc: gdb@sources.redhat.com Subject: Re: break of close loop Message-ID: <20051103212546.GC11828@nevyn.them.org> Mail-Followup-To: Efim Monjak , gdb@sources.redhat.com References: <4368EC1E.3000300@lipowsky.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4368EC1E.3000300@lipowsky.de> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-11/txt/msg00078.txt.bz2 On Wed, Nov 02, 2005 at 05:41:02PM +0100, Efim Monjak wrote: > Hi all, > > if it is need to stop in the small loop i.e.: > for(;;) > ; > which is compiled as one opcode: > lable: > jmp lable: > > GDB works fine by "continue" and "stepi" commands: it sends ctrl+c > receive the break address and doing no more, but by "step" command > it try to do a one step after break address is received. The break address > is the "lable" address and this step starts the loop another time. > > Hier is the part of protocol > (gdb) c > Continuing. > > Program received signal SIGTRAP, Trace/breakpoint trap. > main () at ../src/main.c:95 > 95 ; > (gdb) c > Continuing. > > Program received signal SIGTRAP, Trace/breakpoint trap. > main () at ../src/main.c:95 > 95 ; > (gdb) set debug remote 1 > (gdb) stepi > Sending packet: $s#73...Ack > remote_interrupt called > remote_stop called Why is the step packet not single-stepping the target? Why do you need to use C-c to stop the target? This is a problem with your stub. -- Daniel Jacobowitz CodeSourcery, LLC