From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21271 invoked by alias); 24 Jul 2013 21:17:15 -0000 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 Received: (qmail 21246 invoked by uid 89); 24 Jul 2013 21:17:15 -0000 X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_40,KHOP_THREADED,RCVD_IN_BRBL_LASTEXT,RCVD_IN_HOSTKARMA_YE,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO new.toad.com) (209.237.225.253) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 24 Jul 2013 21:16:52 +0000 Received: from new.toad.com (localhost.localdomain [127.0.0.1]) by new.toad.com (8.12.9/8.12.9) with ESMTP id r6OLGhgN015774; Wed, 24 Jul 2013 14:16:43 -0700 Message-Id: <201307242116.r6OLGhgN015774@new.toad.com> To: Ender Dai cc: "Abid\, Hafiz" , "gdb\@sourceware.org" Subject: Re: gdb behavior on tight loop In-reply-to: <87mwpbq3a8.fsf@cortana.d.cs.uoregon.edu> References: <87r4eopqdb.fsf@cortana.d.cs.uoregon.edu> <87mwpbq3a8.fsf@cortana.d.cs.uoregon.edu> Comments: In-reply-to Ender Dai message dated "Wed, 24 Jul 2013 10:24:47 -0700." Date: Wed, 24 Jul 2013 21:17:00 -0000 From: John Gilmore X-SW-Source: 2013-07/txt/msg00091.txt.bz2 > >> Please see the gdb session below. When I run "next" on line 5, the tight > >> loop, it will take several seconds before gdb stop on line 6 and I regain > >> control. > >> > >> If I set an additional breackpoint on line 6, and "continue" on line 5 instead > >> of "next", everything looks good. In situations like this, the "until" command is convenient. You can say "u 6" and gdb will set a temporary breakpoint at line 6, run the program at full speed until it hits that breakpoint (or some other breakpoint or error) and then remove the temporary breakpoint. John Gilmore