From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id F3FFD3858D3C for ; Wed, 22 Mar 2023 16:44:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F3FFD3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf1Zo-00014v-Lb; Wed, 22 Mar 2023 12:44:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8y398sAf2kTuv3hhHTjOyVlO8L4oNVMmVOFTtXq3zuk=; b=XwwCClAM1UzI eD9hee7432J9ripYXxZ8FVGhYpCS/1DnIyjK6wfY9bjZsvUIsGpKalY9BCybkfpuWWkj2ctQFhzit m1la5Syv4c5uoMss2Q+Wfcc1LDeiPSyAPAW6mk5VL5s+dx1MTFOFV31nYpspvmdLLLwWGx2+50moS eC5PXkeW8+yzp29rOMYR4Sfk1w8yIJHnl475QTFTxuEA4bdRO3LOxYQzhRim+ZNSsIm4kzMl44E/Q HSYBBS/UffEf1SnOaaRuYjWp+lX93Ryh1GFi5IwOALh1VaVgP8uHoJNjqeHNmCmTPsGCHvjmkRnuf ypEMlvX1u2xkMXQO4XWQpg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf1Zn-0000tK-B9; Wed, 22 Mar 2023 12:44:39 -0400 Date: Wed, 22 Mar 2023 18:44:53 +0200 Message-Id: <83o7ok68hm.fsf@gnu.org> From: Eli Zaretskii To: Lancelot SIX Cc: gdb-patches@sourceware.org, lsix@lancelotsix.com In-Reply-To: <20230322163504.560986-4-lancelot.six@amd.com> (message from Lancelot SIX via Gdb-patches on Wed, 22 Mar 2023 16:35:04 +0000) Subject: Re: [PATCH v6 3/3] gdb/gcore: interrupt all threads to generate core in non-stop targets References: <2daa1736-57cb-3c5a-f1cd-48f5aa03d010@simark.ca> <20230322163504.560986-1-lancelot.six@amd.com> <20230322163504.560986-4-lancelot.six@amd.com> X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,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 List-Id: > CC: , Lancelot SIX > Date: Wed, 22 Mar 2023 16:35:04 +0000 > From: Lancelot SIX via Gdb-patches > > diff --git a/gdb/NEWS b/gdb/NEWS > index cc262f1f8a6..65ac722bd2e 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -91,6 +91,14 @@ show always-read-ctf > $2 = 1 > (gdb) break func if $_shell("some command") == 0 > > +* Changed commands > + > +gcore > +generate-core-file > + For non-stop targets, GDB ensures that all threads are stopped before > + generating a core dump. At the end of the command, threads are restored > + to their previous state. > + > * MI changes This part is OK. > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -13763,6 +13763,11 @@ Produce a core dump of the inferior process. The optional argument > specified, the file name defaults to @file{core.@var{pid}}, where > @var{pid} is the inferior process ID. > > +If the current inferior's target is non-stop, @value{GDBN} ensures that Please add a cross-reference after "non-stop" to where we describe that mode. Thanks. Reviewed-By: Eli Zaretskii