This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Speed up the 'if/else'
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Jiang Jilin <freephp at gmail dot com>
- Cc: msnyder at vmware dot com, teawater at gmail dot com, gdb-patches at sourceware dot org
- Date: Sat, 29 Aug 2009 22:35:47 -0700
- Subject: Re: [PATCH] Speed up the 'if/else'
- References: <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