From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22192 invoked by alias); 18 Jun 2006 09:55:24 -0000 Received: (qmail 22177 invoked by uid 22791); 18 Jun 2006 09:55:23 -0000 X-Spam-Check-By: sourceware.org Received: from d102.x-mailer.de (HELO d102.x-mailer.de) (212.162.13.80) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 18 Jun 2006 09:55:22 +0000 Received: from [84.131.195.22] (helo=insanenotebook) by d102.x-mailer.de with esmtp (Exim 4.61) (envelope-from ) id 1Frtzz-0002Xr-Gt for gdb@sourceware.org; Sun, 18 Jun 2006 11:55:19 +0200 From: "Sascha" To: Subject: How to interrupt a stepping GDB ? Date: Mon, 19 Jun 2006 02:13:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-Info: valid message X-Info: original Date 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/msg00121.txt.bz2 Message-ID: <20060619021300.koFxAifj_I7DHHvTSQGrKRzTX_niujuuXnxxNQF_WwM@z> Hello, I've got a question about GDB and the "next/step" command. Situation: The debugger stopped at the C instruction: "for (; a; --a);" This is a simple loop counting down to zero. If you "next", GDB will step through that loop until a == 0. 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; 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. Thanks Sascha