From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWEr-0004EO-Dk for qemu-devel@nongnu.org; Mon, 14 Mar 2016 13:25:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afWEn-0004hj-Ec for qemu-devel@nongnu.org; Mon, 14 Mar 2016 13:25:05 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:34272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afWEm-0004hY-TD for qemu-devel@nongnu.org; Mon, 14 Mar 2016 13:25:01 -0400 Received: by mail-wm0-x231.google.com with SMTP id p65so111599485wmp.1 for ; Mon, 14 Mar 2016 10:25:00 -0700 (PDT) References: <1457090287-8021-1-git-send-email-alex.bennee@linaro.org> <1457090287-8021-6-git-send-email-alex.bennee@linaro.org> <56DAEA82.2070202@twiddle.net> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <56DAEA82.2070202@twiddle.net> Date: Mon, 14 Mar 2016 17:24:57 +0000 Message-ID: <87mvq19dli.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v8 5/9] qemu-log: new option -dfilter to limit output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: pbonzini@redhat.com, crosthwaitepeter@gmail.com, qemu-devel@nongnu.org, aurelien@aurel32.net Richard Henderson writes: > On 03/04/2016 03:18 AM, Alex Bennée wrote: >> + case '+': >> + { >> + unsigned long len; >> + err |= qemu_strtoull(r2, NULL, 0, &len); >> + if (len > 0) { >> + range.end = range.begin + (len - 1); >> + } else { >> + err |= true; >> + } >> + break; >> + } >> + case '-': >> + { >> + unsigned long len; >> + err |= qemu_strtoull(r2, NULL, 0, &len); >> + range.end = range.begin; >> + range.begin = range.end - len; >> + break; >> + } > > Doesn't '-' have the same off-by-one bug? Doh. of course, I'll get that fixed. > Although really I don't understand the need for negative ranges... It's a shortcut, something went wrong at X, lets dump the code from X-n to X to catch the run up to it. > > > r~ -- Alex Bennée