From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2048.outbound.protection.outlook.com [40.107.244.48]) by sourceware.org (Postfix) with ESMTPS id 013EB3858C52 for ; Wed, 22 Mar 2023 16:35:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 013EB3858C52 Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=amd.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BBEXKMsuFAaiNMELOxbKzf45W3Z9Wlz2geL4RjWnolx+2rGPFywdAKn9I76cuCmqCXLVmLAShZAiVSiMIyjuMIPs9PBozvaYKPCNqkhkT04Y31/fyfXIAFdbVJxTfM1aLl3idks0ii2rhiowgOWjqXsVts0lU/HoZMSAakrZNpJUKIR616SeiRe2OgZEL1gKxNb3IZ/iuIHNfqvEwE8mFUuTUAq0Gcm53VM8oIllloMqb6SNVufa7W8T57PiF63RMhZxjsusaf5ofDHJlyhHHXb9aWjMn0C4KhRzD/pc1JuQA90rls8HitXwQx+gW02ISFA344eCtczC9twZ/jKtmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YarQ00izW7hUyyKPSnfi3WIO3aLI1zNssPZyF16i5Vc=; b=Ri/uotjrJdFrwNRZtdQPxhirn4MXAOJF+uLx0M6Blc5Gw8diOEFDWCZJuxFZ7u47tABD4uI0Yx1eZ10kdg5bQj5+o21MQt9tZgMcew4jWQhMJ9Vv8nNX1QgndRPmW0kNQj/1kg8m7QgDfDsp9tHnoFyV3DoU2HpJodXjIdg5LlyLKCLbMLUvfyrEBHvdFuz4QdDH3MHFNLY7ZQjXi26vH7NcgOBvnWaMCNOkRmKnOIYuHaEEQ+M1ZjRkkvGR9DQdjXy+FP/qoIaaSb3onf7mOGiOzIwX8Em5a7T6adRxQg/KDZgMkm+MqpnbRoXOHPkqm66lbpu8AmAJFjEVaRQ2gQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sourceware.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YarQ00izW7hUyyKPSnfi3WIO3aLI1zNssPZyF16i5Vc=; b=TqKFMM/3Q06A2iIumnXXpvrTro5NLTWr5+IsfUsKlwvWgvxh11VTYhZLML9u1f6ZHvGE/9DYgwtu4ufCX9Xi3WGcg/kvbUx7S+opLIZm464lBTkcvdTg8hzj2+aL08fhGZaino2f14JJNvE6q7bPyRlUbENC6uiiqbNGZ42p8pk= Received: from BN9PR03CA0985.namprd03.prod.outlook.com (2603:10b6:408:109::30) by SN7PR12MB7022.namprd12.prod.outlook.com (2603:10b6:806:261::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37; Wed, 22 Mar 2023 16:35:25 +0000 Received: from BN8NAM11FT083.eop-nam11.prod.protection.outlook.com (2603:10b6:408:109:cafe::19) by BN9PR03CA0985.outlook.office365.com (2603:10b6:408:109::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.37 via Frontend Transport; Wed, 22 Mar 2023 16:35:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT083.mail.protection.outlook.com (10.13.177.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6222.17 via Frontend Transport; Wed, 22 Mar 2023 16:35:25 +0000 Received: from khazad-dum.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 22 Mar 2023 11:35:22 -0500 From: Lancelot SIX To: CC: , Lancelot SIX Subject: [PATCH v6 0/3] interrupt all threads to generate core in non-stop targets Date: Wed, 22 Mar 2023 16:35:01 +0000 Message-ID: <20230322163504.560986-1-lancelot.six@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <2daa1736-57cb-3c5a-f1cd-48f5aa03d010@simark.ca> References: <2daa1736-57cb-3c5a-f1cd-48f5aa03d010@simark.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT083:EE_|SN7PR12MB7022:EE_ X-MS-Office365-Filtering-Correlation-Id: 428d86ea-5a3f-44f6-8791-08db2af37030 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q3xPq+fYUJuMkv9fnnbT5iqGCQek1r9Y0+RX3QMzWZK1f04P7cKks+4hBaTz/zZh+QJZu8Ts805xW4bc2nax/UhFBtNAAJYyUCjoWoSP1EuliDskgYVLu/m3zKyAIfsb09dshnbd8KOjJsGdhoih3nVQz9eCdVSE7yD/j1KDg+MWgIQrEhUDQU/3yC93loK+eHHHR4260zUMx+iYFcR9MfjBUzaHLgolwXgzudcz7NfoauqmWnvxScuPKjyToRrCyupAQftpUngcrumzbY3xfg4yCdOtVPktQb7eFDbScgx3xzKQtFGcjxw91BF/SnQ9tsA+AWTjPIHKRuUU9Jwu422CIdF2uGjfz0mEhZUOH3ktKjCl26uSZRBBN6vDQn5EvZAnsgEgyj0uUSLxjwjlU4AcloA0P4ZujZsbrIPSw2WwxyfxKtHGQ6I78YxdZ91Yrzr1oaJnJrrwh+c/jPaDdpTLl0VsZjdcgygkU1wVDesXGXxShLMUAYqiHuUfzHBQm09Vq7F2ba6OE8PWTyr7F5oVvJIug/6ulXSpi5PPgn1/0LymjDTeKBwClc4dIuS5TiuetkqMoJ4gwFuA9btn3UJiIvC5IuHsxgii0TpgjViKRwV/iqKxILMsldqwCrpnjnzLNb8/zWrQ7UKBGNlSPEouC65snvz1tHRWRvCwb0enrKUYR+BGxq05pxM23IMCV2tTtqDMfIDKpAOUlK26WzDSuC3SjlxpCK2V3SMfZas= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(376002)(346002)(136003)(396003)(39860400002)(451199018)(36840700001)(46966006)(40470700004)(36756003)(36860700001)(356005)(82310400005)(86362001)(40460700003)(81166007)(82740400003)(1076003)(6666004)(70586007)(4326008)(6916009)(478600001)(26005)(8676002)(54906003)(7696005)(316002)(40480700001)(966005)(426003)(47076005)(66899018)(41300700001)(186003)(5660300002)(70206006)(2906002)(2616005)(83380400001)(8936002)(336012)(16526019)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Mar 2023 16:35:25.0236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 428d86ea-5a3f-44f6-8791-08db2af37030 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT083.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7022 X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,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 List-Id: Hi, Here is a follow-up to https://sourceware.org/pipermail/gdb-patches/2023-January/196393.html. Noticeable changes from last revision: - Added patch #1 and #2 to improve the assertion at the beginning of stop-all-threads. - With all-stop targets, just check if any thread is still marked as executing and error-out with a meaningful error message when appropriate. This is not ideal as all-stop is not on par with non-stop, but this patch is still overall a step in the right direction in my opinion. This is because the previous implementation was most likely erroneous. Among other things, It did rely on target_stop_on_wait, which internally calls target_wait and discards the resulting target_waitstatus. This does not seem to be the right thing to do. - Adjusted documentation/NEWS to distinguish all-stop/non-stop behaviors. Lancelot SIX (3): gdb: add inferior parameter to target_is_non_stop_p gdb/infrun: Improve assertion in stop_all_threads gdb/gcore: interrupt all threads to generate core in non-stop targets gdb/NEWS | 8 +++ gdb/doc/gdb.texinfo | 5 ++ gdb/gcore.c | 20 ++++++ gdb/infrun.c | 21 +++---- gdb/infrun.h | 9 +++ gdb/target.c | 9 ++- gdb/target.h | 8 ++- gdb/testsuite/gdb.base/gcore-nonstop.c | 44 +++++++++++++ gdb/testsuite/gdb.base/gcore-nonstop.exp | 79 ++++++++++++++++++++++++ 9 files changed, 187 insertions(+), 16 deletions(-) create mode 100644 gdb/testsuite/gdb.base/gcore-nonstop.c create mode 100644 gdb/testsuite/gdb.base/gcore-nonstop.exp base-commit: 6e7eef72164c00d6a5a7b0bce9fa01f5481f33cb -- 2.34.1