From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17003 invoked by alias); 30 Aug 2009 05:36:00 -0000 Received: (qmail 16994 invoked by uid 22791); 30 Aug 2009 05:35:59 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 30 Aug 2009 05:35:54 +0000 Received: from spaceape14.eur.corp.google.com (spaceape14.eur.corp.google.com [172.28.16.148]) by smtp-out.google.com with ESMTP id n7U5ZoYX032592 for ; Sun, 30 Aug 2009 06:35:50 +0100 Received: from ywh27 (ywh27.prod.google.com [10.192.8.27]) by spaceape14.eur.corp.google.com with ESMTP id n7U5ZKKl014476 for ; Sat, 29 Aug 2009 22:35:48 -0700 Received: by ywh27 with SMTP id 27so3364173ywh.2 for ; Sat, 29 Aug 2009 22:35:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.89.8 with SMTP id m8mr4646811ybb.310.1251610548036; Sat, 29 Aug 2009 22:35:48 -0700 (PDT) In-Reply-To: <1251594746-13512-1-git-send-email-freephp@gmail.com> References: <1251594746-13512-1-git-send-email-freephp@gmail.com> Date: Sun, 30 Aug 2009 07:13:00 -0000 Message-ID: <8ac60eac0908292235i7d72bee2jcda6453077669b8a@mail.gmail.com> Subject: Re: [PATCH] Speed up the 'if/else' From: Paul Pluzhnikov To: Jiang Jilin Cc: msnyder@vmware.com, teawater@gmail.com, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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-08/txt/msg00557.txt.bz2 On Sat, Aug 29, 2009 at 6:12 PM, Jiang Jilin wrote: > 2009-08-30 =A0Jiang Jilin > > =A0 =A0 =A0 =A0* reverse.c (exec_reverse_once): add 'else' to speed up What exactly are you trying to speed up here? Your patch looks bogus to me (because 'error (...)' call never returns). > --- > =A0gdb/reverse.c | =A0 =A05 ++--- > =A01 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/gdb/reverse.c b/gdb/reverse.c > index ee59cf3..f2af6d1 100644 > --- a/gdb/reverse.c > +++ b/gdb/reverse.c > @@ -48,9 +48,8 @@ exec_reverse_once (char *cmd, char *args, int from_tty) > =A0 struct cleanup *old_chain; > > =A0 if (dir =3D=3D EXEC_ERROR) > - =A0 =A0error (_("Target %s does not support this command."), target_sho= rtname); > - > - =A0if (dir =3D=3D EXEC_REVERSE) > + =A0 =A0error (_("Target %s does not support this command."), target_sho= rtname); > + =A0else if (dir =3D=3D EXEC_REVERSE) > =A0 =A0 error (_("Already in reverse mode. =A0Use '%s' or 'set exec-dir f= orward'."), > =A0 =A0 =A0 =A0 =A0 cmd); > > -- > 1.5.4.3 > > --=20 Paul Pluzhnikov