From patchwork Wed Apr 24 23:15:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 791574 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1100864wrq; Wed, 24 Apr 2024 16:16:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWDXgAdceCV1CL4PIcQz+Ac8VdCf2/5KJsT6o3f2LCPBXrFYrx6p21pZbCJlUWbLC/QrCIZV9FPhPjQMqiada7B X-Google-Smtp-Source: AGHT+IFAoLWUglWVmpcXpPXMGGjvn3L9tctGC3/njmbjgNYq9hQJVGQb4eHg/gc96jKPEh+1BWbl X-Received: by 2002:ac8:5891:0:b0:43a:3bb1:b7b3 with SMTP id t17-20020ac85891000000b0043a3bb1b7b3mr1374590qta.34.1714000583921; Wed, 24 Apr 2024 16:16:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714000583; cv=pass; d=google.com; s=arc-20160816; b=z1GQE57/qfhOHtaiV/lYl+EkJOE/KnKah7VWCkjqa5KAAe8vm/5DezS+013NLd8I7V gLfuP84SPSxGmlImaPpg/iO3OOzGVYFwyD9YcdO++iVWPVJRJbNwNjIFl4rwvcYVSmym iBXd1BSSI67DOo7WpPnLlWAoEivHsQf2I3KrVwquyxQaa9RlcFGPd6LKpLFcaUuqY48Z PXxzZwG1yUe4Ru00YrpubnpiQu3a+keH/A31ZiAgDgx73M2iONSYZF0rqWHGSLroij2Q TMJZ/S5YDfkwuy7XUE0U37zVZDaLyM+aFgBzCLe0sBwCBi6TgRR+k8+286/HYdokFgvV NN9w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=9ZLSJfDA72Gh4O9CyghOoYA3q8HfLFCTYHUhlTHMErU=; fh=hiz3ehk7igAf1jDTyW+iD8dgiuxOgEsxZsLHCOrAJYo=; b=xOoV89kgzNJY/m6MCNU6Q9FnJ9emxRKZJTcNbn001mTrqObaPVVf9t4fO1LSoO7nlT PgzgdXpla4VF1zuyDo9df5VcfZBlFpIry6pFVzJk8eA6+wLK1p3ZaDzqr4PPFLtSuwS0 L11xilLobX87dTbattrX3Bb/zV27RtEWjuSkwcH787Zu/nz58c78tMG2/IRkfLbE52Km WJuDGY5h74FGw8c5S5ZpFZz+YCZga2VvbnAnc1KSPrGGjmch/pUh9KIvpR3wKVGvkDCZ 0Xy9lZADOXxPY+J/ogLMf7VUd4KIWLa1lRNm+XJJyAAst5LwVEbf6b4CHdBxPLlHNS8N ULOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hDIW15Yh; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gdb-patches-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id fe14-20020a05622a4d4e00b0043975b71375si12019454qtb.283.2024.04.24.16.16.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 16:16:23 -0700 (PDT) Received-SPF: pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hDIW15Yh; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gdb-patches-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 532063846074 for ; Wed, 24 Apr 2024 23:16:23 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id 5D5013846424 for ; Wed, 24 Apr 2024 23:15:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D5013846424 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5D5013846424 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::233 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714000556; cv=none; b=EjmPKPfWCv8SSbWhwl8Ck4Moe4Qg0p7KnbtyU6+eIX97J3YX/6Z5Ln2GKcs5XrUntl6zXL93gmzDg+Owy/bz37lNq1yxL4YEQFsdrLAQeNzZyehSuDrTQ1OW7Z1V+m1Z4So4tfU6fHZoEcDRBmhA40Z1kA1dMKmHjgT35Eae7Ug= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714000556; c=relaxed/simple; bh=gJq6XYjgzUwnEtERwfQAnCLLi+pDY837A1uOgYsnYak=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=U9fJWTT1Hv3Z+/6r/xjYMcxIEBk+78Yh9GLeALea1ZzgICUqu+nfjHRt28CwS6Gp4SI2MbKvopYeo2qsTyAnUPNJo3utoauSZVzvFEFwhH4iu6QPuXzB4mMztBdBaPIJVjSzJ9kb5ZpUK0Ty5t3ckAAPRas6eG3b2S2vDed7gP8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3c75139645aso304315b6e.1 for ; Wed, 24 Apr 2024 16:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714000554; x=1714605354; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9ZLSJfDA72Gh4O9CyghOoYA3q8HfLFCTYHUhlTHMErU=; b=hDIW15Yh38YLWOlB90znLZFOGt7DUDtSh1/Lr9bQxIVNt7WMm0V1XpuVH8TGEs4FXD 0ySFAMNEvwF0qdDiTKSRXv5559o6E51/PgTGei5NV2d+sSpv34LqrSfo7MrSuA4jklqH 0rF2BEn8h+LrRruT6hVEV70E6UTc7ef/Bz0pQLI5To/Mb6KiD0J9Qu4oJRgyObFWJytD OSdQiF/9G+/X9eB0RtSzKxVWQijWLfnQJgBTsHKLFYFb6ceyNfJ71KfpZPBCWXpNsK1m 42oLh7ZP0oD4ctOFEs5tFzH5CVPOKf9RAX/Zjui+MttSsXcwbDSg5q/dHbiPnHRXlWzz iWxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714000554; x=1714605354; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9ZLSJfDA72Gh4O9CyghOoYA3q8HfLFCTYHUhlTHMErU=; b=GxBLnDxJgl6igrDrcDgzDfb4GqQ6w/toybpFGapc8JeQcaYeGSpLGCtkFAT02UgiLt cGxeJ38sMrE9BKuUDNxrsNtsw0yzDHmcV51vEs4IiR3YOKMJyBrs3U/Xd1UgeoOgCsGm mOJxz71sIEUZ5Z7WMYeQmTz/3r5SpWuzwUOmvQWgDFlGuNjy/PiYn2zSf6d2n3lnEbug pyrFNjyeX8B4nkv5T3kpCY76IF7de+knrQlpIEVo/BW11C2bStJlhR3ifQ6Gv5Jl8LjL Yx48sVolp/7Qx6JNNmlnnHjiufaKdI8qlekOzeBYUoMhthvz2WVx8x30JCV2ywZx2Ciw RG5g== X-Gm-Message-State: AOJu0YwMGWUhi/Ql96H2CQWJml3vTeedp5WUsAGjIHSyuLvPxAqylhp2 TiQ7pw0tITlwm0/NlwQ5XaCEhtiWMMcua8KmmP4aAIEM+Rv0EQRTca5c3tKW2mlk5FWLWhG0pKq d X-Received: by 2002:a05:6808:8f5:b0:3c8:311c:ac60 with SMTP id d21-20020a05680808f500b003c8311cac60mr3994547oic.46.1714000554475; Wed, 24 Apr 2024 16:15:54 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:b65d:315b:9fcb:d747]) by smtp.gmail.com with ESMTPSA id a7-20020a654187000000b0060013d7c463sm5136587pgq.72.2024.04.24.16.15.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 16:15:54 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Cc: Christophe Lyon , Luis Machado , Pedro Alves Subject: [PATCH v3 0/3] Fix attaching to process when it has zombie threads Date: Wed, 24 Apr 2024 20:15:48 -0300 Message-ID: <20240424231551.1577518-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patch=linaro.org@sourceware.org Hello, This version just adjusts the comment in patch 1 as suggested by Pedro. This reflects in patch 2, which has a slightly abbreviated version of the comment. v2 of this series is here: https://inbox.sourceware.org/gdb-patches/20240420055652.819024-1-thiago.bauermann@linaro.org/ v1 of this series is here: https://inbox.sourceware.org/gdb-patches/20240321231149.519549-1-thiago.bauermann@linaro.org/ Thiago Jung Bauermann (3): gdb/nat: Use procfs(5) indexes in linux_common_core_of_thread gdb/nat: Factor linux_proc_get_stat_field out of linux_common_core_of_thread gdb/nat/linux: Fix attaching to process when it has zombie threads gdb/nat/linux-osdata.c | 38 +++-------------- gdb/nat/linux-osdata.h | 3 ++ gdb/nat/linux-procfs.c | 97 ++++++++++++++++++++++++++++++++++++++++++ gdb/nat/linux-procfs.h | 11 +++++ 4 files changed, 116 insertions(+), 33 deletions(-) base-commit: f5ef12c3f1af890dcdc6dc54f5ea58a05c6cf65a