public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Remove extra if statement
@ 2023-03-30 16:20 Christina Schimpe
  2023-03-30 16:20 ` [PATCH 1/1] gdb: " Christina Schimpe
  0 siblings, 1 reply; 4+ messages in thread
From: Christina Schimpe @ 2023-03-30 16:20 UTC (permalink / raw)
  To: gdb-patches

Hi all,

this patch was originally written by Ari Hannula.
I just rebased it onto current master.

Regards,
Christina

Ari Hannula (1):
  gdb: Remove extra if statement

 gdb/thread.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

-- 
2.25.1

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] gdb: Remove extra if statement
  2023-03-30 16:20 [PATCH 0/1] Remove extra if statement Christina Schimpe
@ 2023-03-30 16:20 ` Christina Schimpe
  2023-03-30 17:58   ` Simon Marchi
  0 siblings, 1 reply; 4+ messages in thread
From: Christina Schimpe @ 2023-03-30 16:20 UTC (permalink / raw)
  To: gdb-patches; +Cc: Christina Schimpe

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(-)

diff --git a/gdb/thread.c b/gdb/thread.c
index 3d4cba32303..25d97cd6072 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -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;
 	  }
-- 
2.25.1

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] gdb: Remove extra if statement
  2023-03-30 16:20 ` [PATCH 1/1] gdb: " Christina Schimpe
@ 2023-03-30 17:58   ` Simon Marchi
  2023-03-31 14:26     ` Schimpe, Christina
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Marchi @ 2023-03-30 17:58 UTC (permalink / raw)
  To: Christina Schimpe, gdb-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 1/1] gdb: Remove extra if statement
  2023-03-30 17:58   ` Simon Marchi
@ 2023-03-31 14:26     ` Schimpe, Christina
  0 siblings, 0 replies; 4+ messages in thread
From: Schimpe, Christina @ 2023-03-31 14:26 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-31 14:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 16:20 [PATCH 0/1] Remove extra if statement Christina Schimpe
2023-03-30 16:20 ` [PATCH 1/1] gdb: " Christina Schimpe
2023-03-30 17:58   ` Simon Marchi
2023-03-31 14:26     ` Schimpe, Christina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).