From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5869 invoked by alias); 15 May 2013 11:22:12 -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 5857 invoked by uid 89); 15 May 2013 11:22:11 -0000 X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,SPF_SOFTFAIL autolearn=no version=3.3.1 Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 15 May 2013 11:22:05 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MMU00L007JKR400@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Wed, 15 May 2013 14:21:39 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MMU00LGJ7K3QC50@a-mtaout21.012.net.il>; Wed, 15 May 2013 14:21:39 +0300 (IDT) Date: Wed, 15 May 2013 11:22:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 3/5] range stepping: gdb In-reply-to: <5193621C.50603@redhat.com> To: Pedro Alves Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83ppws5w00.fsf@gnu.org> References: <20130514191026.13213.39574.stgit@brno.lan> <20130514191047.13213.8476.stgit@brno.lan> <83k3n173ao.fsf@gnu.org> <5193621C.50603@redhat.com> X-SW-Source: 2013-05/txt/msg00515.txt.bz2 > Date: Wed, 15 May 2013 11:23:24 +0100 > From: Pedro Alves > CC: gdb-patches@sourceware.org > > >> +@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? > > Sorry, I had that typo in the gdbserver code as well, fixed it > there, but missed this one. > > It should read, even if the instruction at @var{start} jumps to @var{start}. > > vCont;r first steps, then checks. IOW: > > vCont ;r ADDR1,ADDR1 > > is equivalent to (and could be thought to supersede): > > vCont ;s > > > And if END is excluded from the > > range, then why when START equals END do we step at all? Please > > explain. > > It's just a design decision. I recall at least one target I saw I worked > with that supported range stepping, and it didn't even a distinction > between range vs no-range step commands. The way to do a single step > was to pass both addresses the same. I find it a better design than > requiring the target do one current-address check _before_ stepping, > and another _after_ single-stepping. Doesn't this mean that these two use cases are explicit exceptions from the rule that END is excluded? If so, we should describe them as exceptions, not use them as evidence for the rule (which they evidently violate). Or did I misunderstand again?