From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28598 invoked by alias); 14 May 2013 19:46:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28588 invoked by uid 89); 14 May 2013 19:46:36 -0000 X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_NIX_SPAM,SPF_SOFTFAIL autolearn=no version=3.3.1 Received: from mtaout20.012.net.il (HELO mtaout20.012.net.il) (80.179.55.166) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 14 May 2013 19:46:35 +0000 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MMT00M0006G2A00@a-mtaout20.012.net.il> for gdb-patches@sourceware.org; Tue, 14 May 2013 22:46:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MMT00LUJ09HPMJ0@a-mtaout20.012.net.il>; Tue, 14 May 2013 22:46:29 +0300 (IDT) Date: Tue, 14 May 2013 19:46:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 3/5] range stepping: gdb In-reply-to: <20130514191047.13213.8476.stgit@brno.lan> To: Pedro Alves Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83k3n173ao.fsf@gnu.org> References: <20130514191026.13213.39574.stgit@brno.lan> <20130514191047.13213.8476.stgit@brno.lan> X-SW-Source: 2013-05/txt/msg00496.txt.bz2 > From: Pedro Alves > Date: Tue, 14 May 2013 20:10:47 +0100 > > When user issues the "step" command on the following line of source, > > a = b + c + d * e - a; > > GDB single-steps every single instruction until the program reaches a > new different line. I always thought that GDB sets a temporary breakpoint at the end, and then lets the target run freely. Why not? > +@var{end} is the address of the first instruction beyond the step > +range, and @strong{not} the address of the last instruction within it. > +(This has the property that @var{start} == @var{end} single-steps > +once, and only once, even if the instruction at @var{start} jumps to > +@var{end}.) This sentence in parentheses got me completely confused. Before reading it, I thought I understood what is this about; now I don't. In particular, if START is equal to END, then how in the world could the instruction at START jump to END? And if END is excluded from the range, then why when START equals END do we step at all? Please explain.