From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22757 invoked by alias); 30 Jul 2007 11:43:10 -0000 Received: (qmail 22749 invoked by uid 22791); 30 Jul 2007 11:43:10 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 30 Jul 2007 11:43:07 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 6E15898311; Mon, 30 Jul 2007 11:43:06 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 4C9D298294; Mon, 30 Jul 2007 11:43:06 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1IFTeR-0006l6-R4; Mon, 30 Jul 2007 07:43:03 -0400 Date: Mon, 30 Jul 2007 19:47:00 -0000 From: Daniel Jacobowitz To: congli Cc: gdb@sourceware.org Subject: Re: Why does gdb implement 'next' command with a series of "vCont;s"? Message-ID: <20070730114303.GA25571@caradoc.them.org> Mail-Followup-To: congli , gdb@sourceware.org References: <4414a3a80707292237l543b1b03w5cc2d5d93fe44a47@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4414a3a80707292237l543b1b03w5cc2d5d93fe44a47@mail.gmail.com> User-Agent: Mutt/1.5.15 (2007-04-09) 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: 2007-07/txt/msg00209.txt.bz2 On Mon, Jul 30, 2007 at 01:37:33PM +0800, congli wrote: > My question is, when I issue the 'next' command, gdb already > know the 'step_range_end' is 0x804836f, why not implement the > 'next' command by set a breakpoint at 0x804836f and then issue > "vCont;c"? When the program meet the breakpoint at 0x804836f, > we can do a single "vCont;s" to the first instruction of > line 7, 0x8048372. GDB does not know what the instructions between here and there do. One of them might be a branch or a function call. -- Daniel Jacobowitz CodeSourcery