public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] nptl_db: Remove stale `match_pid' parameter from `iterate_thread_list'
@ 2018-02-19 13:31 Maciej W. Rozycki
  2018-02-19 13:46 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2018-02-19 13:31 UTC (permalink / raw)
  To: libc-alpha; +Cc: Adhemerval Zanella

Complement commit c579f48edba8 ("Remove cached PID/TID in clone") and 
remove the `match_pid' parameter not used by `iterate_thread_list' any 
longer.  Update call sites accordingly.

	* nptl_db/td_ta_thr_iter.c (iterate_thread_list): Remove 
	`match_pid' parameter.
	(td_ta_thr_iter): Update accordingly.
---
Hi,

 Discovered while looking into a GDB MIPS/Linux core file handling bug: 
<https://sourceware.org/ml/gdb-patches/2017-11/msg00184.html>.

 No build issues with `i686-linux', `mips-linux' or `x86_64-linux'.  OK to 
apply?

  Maciej
---
 nptl_db/td_ta_thr_iter.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

glibc-thread-db-thr-iter-match-pid.diff
Index: glibc/nptl_db/td_ta_thr_iter.c
===================================================================
--- glibc.orig/nptl_db/td_ta_thr_iter.c	2017-11-07 21:31:52.000000000 +0000
+++ glibc/nptl_db/td_ta_thr_iter.c	2017-11-14 17:25:17.130741535 +0000
@@ -23,7 +23,7 @@
 static td_err_e
 iterate_thread_list (td_thragent_t *ta, td_thr_iter_f *callback,
 		     void *cbdata_p, td_thr_state_e state, int ti_pri,
-		     psaddr_t head, bool fake_empty, pid_t match_pid)
+		     psaddr_t head, bool fake_empty)
 {
   td_err_e err;
   psaddr_t next, ofs;
@@ -133,18 +133,17 @@ td_ta_thr_iter (const td_thragent_t *ta_
      have to iterate over both lists separately.  We start with the
      list of threads with user-defined stacks.  */
 
-  pid_t pid = ps_getpid (ta->ph);
   err = DB_GET_SYMBOL (list, ta, __stack_user);
   if (err == TD_OK)
     err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri,
-			       list, true, pid);
+			       list, true);
 
   /* And the threads with stacks allocated by the implementation.  */
   if (err == TD_OK)
     err = DB_GET_SYMBOL (list, ta, stack_used);
   if (err == TD_OK)
     err = iterate_thread_list (ta, callback, cbdata_p, state, ti_pri,
-			       list, false, pid);
+			       list, false);
 
   return err;
 }

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

* Re: [PATCH] nptl_db: Remove stale `match_pid' parameter from `iterate_thread_list'
  2018-02-19 13:31 [PATCH] nptl_db: Remove stale `match_pid' parameter from `iterate_thread_list' Maciej W. Rozycki
@ 2018-02-19 13:46 ` Andreas Schwab
  2018-03-01 16:57   ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2018-02-19 13:46 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: libc-alpha, Adhemerval Zanella

On Feb 19 2018, "Maciej W. Rozycki" <macro@mips.com> wrote:

> 	* nptl_db/td_ta_thr_iter.c (iterate_thread_list): Remove 
> 	`match_pid' parameter.
> 	(td_ta_thr_iter): Update accordingly.

Ok.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: [PATCH] nptl_db: Remove stale `match_pid' parameter from `iterate_thread_list'
  2018-02-19 13:46 ` Andreas Schwab
@ 2018-03-01 16:57   ` Maciej W. Rozycki
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2018-03-01 16:57 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha, Adhemerval Zanella

On Mon, 19 Feb 2018, Andreas Schwab wrote:

> > 	* nptl_db/td_ta_thr_iter.c (iterate_thread_list): Remove 
> > 	`match_pid' parameter.
> > 	(td_ta_thr_iter): Update accordingly.
> 
> Ok.

 Change now applied, thanks for your review.

  Maciej

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

end of thread, other threads:[~2018-03-01 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-19 13:31 [PATCH] nptl_db: Remove stale `match_pid' parameter from `iterate_thread_list' Maciej W. Rozycki
2018-02-19 13:46 ` Andreas Schwab
2018-03-01 16:57   ` Maciej W. Rozycki

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