From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20490 invoked by alias); 20 Oct 2009 20:54:12 -0000 Received: (qmail 20481 invoked by uid 22791); 20 Oct 2009 20:54:11 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Oct 2009 20:54:08 +0000 Received: (qmail 12202 invoked from network); 20 Oct 2009 20:54:06 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Oct 2009 20:54:06 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA] Expand "info record" Date: Tue, 20 Oct 2009 20:54:00 -0000 User-Agent: KMail/1.9.10 Cc: Michael Snyder , Hui Zhu References: <4AD358E7.50009@vmware.com> <4AD4BF46.7050206@vmware.com> <4ADE1310.3030203@vmware.com> In-Reply-To: <4ADE1310.3030203@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910202154.04566.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2009-10/txt/msg00480.txt.bz2 On Tuesday 20 October 2009 20:44:16, Michael Snyder wrote: > + =A0unsigned long long insn_num; ULONGEST > + (p !=3D NULL) && (p->type !=3D record_end); Superfluous parens. > + printf_filtered (_("Lowest recorded instruction number is %llu.\n"= ), > + p->u.end.insn_num); pulongest > + /* Display instruction number for last instruction in the log. */ > + printf_filtered (_("Highest recorded instruction number is %llu.\n= "),=20 > + record_insn_count ? record_insn_count - 1 : 0); Why the conditional subtraction? Given this post inc: > + rec->u.end.insn_num =3D record_insn_count++; The subtraction looks suspicious. Could you add a comment to record_insn_num and record_insn_count's definitions explaining what they are and how they're different, if it doesn't become obvious? --=20 Pedro Alves