From patchwork Mon Feb 19 13:02:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 25966 Received: (qmail 50005 invoked by alias); 19 Feb 2018 13:05:23 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 49991 invoked by uid 89); 19 Feb 2018 13:05:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy=20171107 X-HELO: 9pmail.ess.barracuda.com Date: Mon, 19 Feb 2018 13:02:48 +0000 From: "Maciej W. Rozycki" To: CC: Adhemerval Zanella Subject: [PATCH] nptl_db: Remove stale `match_pid' parameter from `iterate_thread_list' Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 X-BESS-ID: 1519045508-637137-16990-135081-14 X-BESS-VER: 2018.2-r1802152108 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.190186 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 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: . 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; }