From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id V3aGDkwdHmQ1tBgAWB0awg (envelope-from ) for ; Fri, 24 Mar 2023 17:59:40 -0400 Received: by simark.ca (Postfix, from userid 112) id 2E57A1E223; Fri, 24 Mar 2023 17:59:40 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=gcKvIvj+; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DD8F51E0D3 for ; Fri, 24 Mar 2023 17:59:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 73BB23858C33 for ; Fri, 24 Mar 2023 21:59:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73BB23858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679695179; bh=2OUp+DSAE7TNwPRXC5Y4Ak0gUm0JyKEIQQhjJvCUIYc=; h=Date:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=gcKvIvj+Ez7zHaesuNpEIiQaQ2Hkw6awjtWeKyov2R5fgI7xrS2ktG2cvjVdVF9hC +8MUw8AEm1aLEQuf1j1fEaj0/SMA6f0s8aFQZvhQnxQTvFyv8OXdDcpGRHWQ+0Zjjf zk9dk1qu+R2lLbuDO7+C3fw++rH5W6QovE3/j7xU= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 5C1A43858D28 for ; Fri, 24 Mar 2023 21:59:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C1A43858D28 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-151-xOVRLA8jOoSNJqTOblRY_w-1; Fri, 24 Mar 2023 17:59:17 -0400 X-MC-Unique: xOVRLA8jOoSNJqTOblRY_w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 38EA6885620; Fri, 24 Mar 2023 21:59:17 +0000 (UTC) Received: from f37-zws-nv (unknown [10.2.16.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E9FCF140EBF4; Fri, 24 Mar 2023 21:59:16 +0000 (UTC) Date: Fri, 24 Mar 2023 14:59:15 -0700 To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] PR gdb/30219: Clear sync_quit_force_run in quit_force Message-ID: <20230324145915.13b88ab8@f37-zws-nv> In-Reply-To: <9bf423f6-bea3-6b0e-3052-596de36d4a5e@polymtl.ca> References: <20230310231851.141981-1-kevinb@redhat.com> <9bf423f6-bea3-6b0e-3052-596de36d4a5e@polymtl.ca> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Kevin Buettner via Gdb-patches Reply-To: Kevin Buettner Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Thu, 23 Mar 2023 11:26:56 -0400 Simon Marchi wrote: > > diff --git a/gdb/annotate.c b/gdb/annotate.c > > index 60fe6ccd5c2..36efce1af7c 100644 > > --- a/gdb/annotate.c > > +++ b/gdb/annotate.c > > @@ -282,6 +282,13 @@ annotate_quit (void) > > printf_unfiltered (("\n\032\032quit\n")); > > } > > > > +void > > +annotate_forced_quit (void) > > +{ > > + if (annotation_level > 1) > > + printf_unfiltered (("\n\032\032forced-quit\n")); > > Hmm, this in a new annotation? In theory, this would need to be > documented, to have a NEWS entry, etc. And then frontends using > annotations would need to be updated to use that. We don't really want > that, if possible, given annotations are obsolete. > > Would it work to display the "quit" annotation (the one printed by > annotate_quit)? The doc [1] says, for that annotation: > > This annotation occurs right before GDB responds to an interrupt. > > and: > > Quit and error annotations indicate that any annotations which GDB was > in the middle of may end abruptly. For example, if a > value-history-begin annotation is followed by a error, one cannot > expect to receive the matching value-history-end. > > I think it also works in the forced quit case. The execution of > whatever thing was going on is interrupted, just like in the regular > quit case, it just happens that GDB also happens to exit after that. > > [1] https://sourceware.org/gdb/onlinedocs/annotate.html#Errors I agree. I've prepared a v2 patch which I'll send shortly. Kevin