From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679695159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2OUp+DSAE7TNwPRXC5Y4Ak0gUm0JyKEIQQhjJvCUIYc=; b=djj72pJa2/CSY57h0luDJ4wzeOZ5WUazqU08O3ubruh0ap1RLtUvXJAQYlaIZRkyP6T7wg QDUDGrwmevyXaRfjGGxXdGEVv2PX3HoClN9DVs2LvCikgnEynGjJsHb+zhcovV5Wk4GCy4 BwFRPxqLV4wfWU1V2l8lEASANBv7h2g= 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 From: Kevin Buettner 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-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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: 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