From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16167 invoked by alias); 20 Jun 2006 12:23:46 -0000 Received: (qmail 16157 invoked by uid 22791); 20 Jun 2006 12:23:45 -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, 20 Jun 2006 12:23:44 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FsfGZ-0005G6-Jp; Tue, 20 Jun 2006 08:23:35 -0400 Date: Tue, 20 Jun 2006 12:24:00 -0000 From: Daniel Jacobowitz To: Sascha Cc: gdb@sourceware.org Subject: Re: How to interrupt a stepping GDB ? Message-ID: <20060620122335.GB20079@nevyn.them.org> Mail-Followup-To: Sascha , gdb@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes 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 X-SW-Source: 2006-06/txt/msg00132.txt.bz2 On Sun, Jun 18, 2006 at 11:55:19AM +0200, Sascha wrote: > On a local, fast machine this might be okay. But on a (slow) remote target, > stepping a loop like this will take minutes or hours because GDB sends > thousands or even millions of step commands until a == 0; [The correct fix for this is to add a "step range" packet, which will speed up the process immensely. As it happens, I hope to do that for the next version of GDB after 6.5.] > Now the question: If I notice such a case - how can I interrupt GDB? If I > notice that the stepping would take a long time I'd rather interrupt GDB and > set a breakpoint on the next line. CTRL-C does not work. And waiting hours > or shutting down GDB is no acceptable. Breakpoint 1, main () at loop.c:3 3 int a = 200000; (gdb) s 4 for (; a; --a); (gdb) n Program received signal SIGINT, Interrupt. 0x000000000040043c in main () at loop.c:4 4 for (; a; --a); CTRL-C works for me... -- Daniel Jacobowitz CodeSourcery