[1/1] gdb: Remove extra if statement
Commit Message
From: Ari Hannula <ari.hannula@intel.com>
The removed if statement is already checked in the parent if else
statement.
Co-Authored-By: Christina Schimpe <christina.schimpe@intel.com>
---
gdb/thread.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
Comments
On 3/30/23 12:20, Christina Schimpe via Gdb-patches wrote:
> From: Ari Hannula <ari.hannula@intel.com>
>
> The removed if statement is already checked in the parent if else
> statement.
>
> Co-Authored-By: Christina Schimpe <christina.schimpe@intel.com>
Thanks:
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Simon
I pushed this.
Thanks,
Christina
> -----Original Message-----
> From: Simon Marchi <simark@simark.ca>
> Sent: Thursday, March 30, 2023 7:58 PM
> To: Schimpe, Christina <christina.schimpe@intel.com>; gdb-
> patches@sourceware.org
> Subject: Re: [PATCH 1/1] gdb: Remove extra if statement
>
> On 3/30/23 12:20, Christina Schimpe via Gdb-patches wrote:
> > From: Ari Hannula <ari.hannula@intel.com>
> >
> > The removed if statement is already checked in the parent if else
> > statement.
> >
> > Co-Authored-By: Christina Schimpe <christina.schimpe@intel.com>
>
> Thanks:
>
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
>
> Simon
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
@@ -1083,16 +1083,13 @@ print_thread_info_1 (struct ui_out *uiout, const char *requested_threads,
global_ids, pid, tp))
continue;
- if (!uiout->is_mi_like_p ())
- {
- /* Switch inferiors so we're looking at the right
- target stack. */
- switch_to_inferior_no_thread (tp->inf);
-
- target_id_col_width
- = std::max (target_id_col_width,
- thread_target_id_str (tp).size ());
- }
+ /* Switch inferiors so we're looking at the right
+ target stack. */
+ switch_to_inferior_no_thread (tp->inf);
+
+ target_id_col_width
+ = std::max (target_id_col_width,
+ thread_target_id_str (tp).size ());
++n_threads;
}