From: Luis Machado <lgustavo@codesourcery.com>
To: Simon Marchi <simon.marchi@ericsson.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Remove unnecessary inferior lookup in inferior_command
Date: Mon, 05 Dec 2016 22:34:00 -0000 [thread overview]
Message-ID: <2efbaa89-3259-ab1e-056a-37f9320e06d0@codesourcery.com> (raw)
In-Reply-To: <20161205223216.5443-1-simon.marchi@ericsson.com>
On 12/05/2016 04:32 PM, Simon Marchi wrote:
> In the case where we switch to a non-running inferior, we do a
> "find_inferior_id (num)", although we did the same call right before. We can
> safely remove it.
>
> gdb/ChangeLog:
>
> * inferior.c (inferior_command): Remove duplicate
> find_inferior_id call.
> ---
> gdb/inferior.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/gdb/inferior.c b/gdb/inferior.c
> index 0abd2c058e..9fcdbd3b83 100644
> --- a/gdb/inferior.c
> +++ b/gdb/inferior.c
> @@ -763,9 +763,6 @@ inferior_command (char *args, int from_tty)
> }
> else
> {
> - struct inferior *inf;
> -
> - inf = find_inferior_id (num);
> set_current_inferior (inf);
> switch_to_thread (null_ptid);
> set_current_program_space (inf->pspace);
>
Looks fairly obvious.
next prev parent reply other threads:[~2016-12-05 22:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 22:32 Simon Marchi
2016-12-05 22:34 ` Luis Machado [this message]
2016-12-06 21:23 ` Simon Marchi
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=2efbaa89-3259-ab1e-056a-37f9320e06d0@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.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