public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb: remove duplicate declaration of 'find_thread_ptid'
@ 2021-06-28 15:11 Tankut Baris Aktemur
  2021-06-28 17:47 ` Simon Marchi
  2021-06-28 17:48 ` Andrew Burgess
  0 siblings, 2 replies; 4+ messages in thread
From: Tankut Baris Aktemur @ 2021-06-28 15:11 UTC (permalink / raw)
  To: gdb-patches

There are two declarations of 'find_thread_ptid' in gdbthread.h
with the same signature:

  extern thread_info *find_thread_ptid (inferior *inf, ptid_t ptid);

Remove the newer declaration, retain the older one.  Tested by rebuilding.

gdb/ChangeLog:
2021-06-28  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	* gdbthread.h (find_thread_ptid): Remove the duplicate declaration.
---
 gdb/gdbthread.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index eef37f79e6a..2780656f973 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -472,9 +472,6 @@ extern bool in_thread_list (process_stratum_target *targ, ptid_t ptid);
    global id, not the system's).  */
 extern int valid_global_thread_id (int global_id);
 
-/* Find (non-exited) thread PTID of inferior INF.  */
-extern thread_info *find_thread_ptid (inferior *inf, ptid_t ptid);
-
 /* Search function to lookup a (non-exited) thread by 'ptid'.  */
 extern struct thread_info *find_thread_ptid (process_stratum_target *targ,
 					     ptid_t ptid);
-- 
2.17.1


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

* Re: [PATCH] gdb: remove duplicate declaration of 'find_thread_ptid'
  2021-06-28 15:11 [PATCH] gdb: remove duplicate declaration of 'find_thread_ptid' Tankut Baris Aktemur
@ 2021-06-28 17:47 ` Simon Marchi
  2021-06-29  7:01   ` Aktemur, Tankut Baris
  2021-06-28 17:48 ` Andrew Burgess
  1 sibling, 1 reply; 4+ messages in thread
From: Simon Marchi @ 2021-06-28 17:47 UTC (permalink / raw)
  To: Tankut Baris Aktemur, gdb-patches

On 2021-06-28 11:11 a.m., Tankut Baris Aktemur via Gdb-patches wrote:
> There are two declarations of 'find_thread_ptid' in gdbthread.h
> with the same signature:
> 
>   extern thread_info *find_thread_ptid (inferior *inf, ptid_t ptid);
> 
> Remove the newer declaration, retain the older one.  Tested by rebuilding.
> 
> gdb/ChangeLog:
> 2021-06-28  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
> 
> 	* gdbthread.h (find_thread_ptid): Remove the duplicate declaration.
> ---
>  gdb/gdbthread.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
> index eef37f79e6a..2780656f973 100644
> --- a/gdb/gdbthread.h
> +++ b/gdb/gdbthread.h
> @@ -472,9 +472,6 @@ extern bool in_thread_list (process_stratum_target *targ, ptid_t ptid);
>     global id, not the system's).  */
>  extern int valid_global_thread_id (int global_id);
>  
> -/* Find (non-exited) thread PTID of inferior INF.  */
> -extern thread_info *find_thread_ptid (inferior *inf, ptid_t ptid);
> -
>  /* Search function to lookup a (non-exited) thread by 'ptid'.  */
>  extern struct thread_info *find_thread_ptid (process_stratum_target *targ,
>  					     ptid_t ptid);
> 

Thanks, that could count as trivial.

But since I'm here: I prefer the comment that you removed over the one
you left.  It's more concise and straight to the point, to say the same
thing.

Ok to push in any case.

Simon

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

* Re: [PATCH] gdb: remove duplicate declaration of 'find_thread_ptid'
  2021-06-28 15:11 [PATCH] gdb: remove duplicate declaration of 'find_thread_ptid' Tankut Baris Aktemur
  2021-06-28 17:47 ` Simon Marchi
@ 2021-06-28 17:48 ` Andrew Burgess
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Burgess @ 2021-06-28 17:48 UTC (permalink / raw)
  To: Tankut Baris Aktemur; +Cc: gdb-patches

* Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org> [2021-06-28 17:11:11 +0200]:

> There are two declarations of 'find_thread_ptid' in gdbthread.h
> with the same signature:
> 
>   extern thread_info *find_thread_ptid (inferior *inf, ptid_t ptid);
> 
> Remove the newer declaration, retain the older one.  Tested by rebuilding.
> 
> gdb/ChangeLog:
> 2021-06-28  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
> 
> 	* gdbthread.h (find_thread_ptid): Remove the duplicate
> 	* declaration.

LGTM.

Thanks,
Andrew


> ---
>  gdb/gdbthread.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
> index eef37f79e6a..2780656f973 100644
> --- a/gdb/gdbthread.h
> +++ b/gdb/gdbthread.h
> @@ -472,9 +472,6 @@ extern bool in_thread_list (process_stratum_target *targ, ptid_t ptid);
>     global id, not the system's).  */
>  extern int valid_global_thread_id (int global_id);
>  
> -/* Find (non-exited) thread PTID of inferior INF.  */
> -extern thread_info *find_thread_ptid (inferior *inf, ptid_t ptid);
> -
>  /* Search function to lookup a (non-exited) thread by 'ptid'.  */
>  extern struct thread_info *find_thread_ptid (process_stratum_target *targ,
>  					     ptid_t ptid);
> -- 
> 2.17.1
> 

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

* RE: [PATCH] gdb: remove duplicate declaration of 'find_thread_ptid'
  2021-06-28 17:47 ` Simon Marchi
@ 2021-06-29  7:01   ` Aktemur, Tankut Baris
  0 siblings, 0 replies; 4+ messages in thread
From: Aktemur, Tankut Baris @ 2021-06-29  7:01 UTC (permalink / raw)
  To: Simon Marchi; +Cc: andrew.burgess, gdb-patches

On Monday, June 28, 2021 7:47 PM, Simon Marchi wrote:
> On 2021-06-28 11:11 a.m., Tankut Baris Aktemur via Gdb-patches wrote:
> > There are two declarations of 'find_thread_ptid' in gdbthread.h
> > with the same signature:
> >
> >   extern thread_info *find_thread_ptid (inferior *inf, ptid_t ptid);
> >
> > Remove the newer declaration, retain the older one.  Tested by rebuilding.
> >
> > gdb/ChangeLog:
> > 2021-06-28  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
> >
> > 	* gdbthread.h (find_thread_ptid): Remove the duplicate declaration.
> > ---
> >  gdb/gdbthread.h | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
> > index eef37f79e6a..2780656f973 100644
> > --- a/gdb/gdbthread.h
> > +++ b/gdb/gdbthread.h
> > @@ -472,9 +472,6 @@ extern bool in_thread_list (process_stratum_target *targ, ptid_t
> ptid);
> >     global id, not the system's).  */
> >  extern int valid_global_thread_id (int global_id);
> >
> > -/* Find (non-exited) thread PTID of inferior INF.  */
> > -extern thread_info *find_thread_ptid (inferior *inf, ptid_t ptid);
> > -
> >  /* Search function to lookup a (non-exited) thread by 'ptid'.  */
> >  extern struct thread_info *find_thread_ptid (process_stratum_target *targ,
> >  					     ptid_t ptid);
> >
> 
> Thanks, that could count as trivial.
> 
> But since I'm here: I prefer the comment that you removed over the one
> you left.  It's more concise and straight to the point, to say the same
> thing.
> 
> Ok to push in any case.
> 
> Simon

I pushed the version you suggested, because as a bonus it also removed the
declaration with the redundant 'struct' keyword.

Thanks.
-Baris


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:[~2021-06-29  7:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 15:11 [PATCH] gdb: remove duplicate declaration of 'find_thread_ptid' Tankut Baris Aktemur
2021-06-28 17:47 ` Simon Marchi
2021-06-29  7:01   ` Aktemur, Tankut Baris
2021-06-28 17:48 ` Andrew Burgess

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