Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Jiang Jilin <freephp@gmail.com>
Cc: msnyder@vmware.com, teawater@gmail.com, gdb-patches@sourceware.org
Subject: Re: [PATCH] Speed up the 'if/else'
Date: Sun, 30 Aug 2009 07:13:00 -0000	[thread overview]
Message-ID: <8ac60eac0908292235i7d72bee2jcda6453077669b8a@mail.gmail.com> (raw)
In-Reply-To: <1251594746-13512-1-git-send-email-freephp@gmail.com>

On Sat, Aug 29, 2009 at 6:12 PM, Jiang Jilin<freephp@gmail.com> wrote:
> 2009-08-30  Jiang Jilin <freephp@gmail.com>
>
>        * 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).

> ---
>  gdb/reverse.c |    5 ++---
>  1 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)
>   struct cleanup *old_chain;
>
>   if (dir == EXEC_ERROR)
> -    error (_("Target %s does not support this command."), target_shortname);
> -
> -  if (dir == EXEC_REVERSE)
> +    error (_("Target %s does not support this command."), target_shortname);
> +  else if (dir == EXEC_REVERSE)
>     error (_("Already in reverse mode.  Use '%s' or 'set exec-dir forward'."),
>           cmd);
>
> --
> 1.5.4.3
>
>



-- 
Paul Pluzhnikov


  reply	other threads:[~2009-08-30  5:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-30  2:56 Jiang Jilin
2009-08-30  7:13 ` Paul Pluzhnikov [this message]
2009-08-30  8:41   ` Jiang Jilin
2009-08-30 13:15 ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ac60eac0908292235i7d72bee2jcda6453077669b8a@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=freephp@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@vmware.com \
    --cc=teawater@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox