From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mBXNI6ksyGPlnRkAWB0awg (envelope-from ) for ; Wed, 18 Jan 2023 12:30:17 -0500 Received: by simark.ca (Postfix, from userid 112) id 8846B1E128; Wed, 18 Jan 2023 12:30:17 -0500 (EST) 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=x6OtejNO; 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 3FC661E0D3 for ; Wed, 18 Jan 2023 12:30:17 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DDB6F3858417 for ; Wed, 18 Jan 2023 17:30:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDB6F3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674063016; bh=lMzNdPw5ms359+X0iTYQAom2fUQDmLpA4Gl5GTRQRCo=; h=Date:To:Cc:In-Reply-To:Subject:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=x6OtejNOq80BMkJTPXbsSk3oz9bMNyR6uF/FJxgh0e2X0GC/SLQA+HtrcV1jhAW96 PDf+O7GO/S7tMI93kUPT8oNvYsCP4Yvfw7GAuqnWGZIsdClZZKZbF9i9fb1P0JrFb6 /XDJ8N5tzh94/0p3B2kXjR+yPzfKBs2PpOIvOyiw= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 25A5C3858D28 for ; Wed, 18 Jan 2023 17:29:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 25A5C3858D28 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 1pICG5-0000qJ-5s; Wed, 18 Jan 2023 12:29:57 -0500 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 1pICG4-0003gV-I1; Wed, 18 Jan 2023 12:29:56 -0500 Date: Wed, 18 Jan 2023 19:30:10 +0200 Message-Id: <83bkmv21jx.fsf@gnu.org> To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <9008dc2605a09477a5978381c107a33f8b6760a9.1674058360.git.aburgess@redhat.com> (message from Andrew Burgess via Gdb-patches on Wed, 18 Jan 2023 16:18:06 +0000) Subject: Re: [PATCHv2 10/13] gdb: add timeouts for inferior function calls References: <9008dc2605a09477a5978381c107a33f8b6760a9.1674058360.git.aburgess@redhat.com> 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: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Cc: Andrew Burgess > Date: Wed, 18 Jan 2023 16:18:06 +0000 > From: Andrew Burgess via Gdb-patches > > diff --git a/gdb/NEWS b/gdb/NEWS > index c0aac212e30..2689569a8f3 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -17,6 +17,24 @@ maintenance print record-instruction [ N ] > prints how GDB would undo the N-th previous instruction, and if N is > positive, it prints how GDB will redo the N-th following instruction. > > +set direct-call-timeout SECONDS > +show direct-call-timeout > +set indirect-call-timeout SECONDS > +show indirect-call-timeout > + These new settings can be used to limit how long GDB will wait for > + an inferior function call to complete. The direct timeout is used > + for inferior function calls from e.g. 'call' and 'print' commands, > + while the indirect timeout is used for inferior function calls from > + within a conditional breakpoint expression. > + > + The default for the direct timeout is unlimited, while the default > + for the indirect timeout is 30 seconds. > + > + These timeouts will only have an effect for targets that are > + operating in async mode. For non-async targets the timeouts are > + ignored, GDB will wait indefinitely for an inferior function to > + complete, unless interrupted by the user using Ctrl-C. This part is OK. > +This setting is used when the user calls a function directly from the > +command prompt, for example with a @code{call} or @code{print} > +command. Please add here cross-references to where these commands are described. > +This setting only works for targets that support asynchronous > +execution (@pxref{Background Execution}), for any other target the > +setting is treated as @code{unlimited}. This is a repetition of what you already wrote above. I don't think we need to repeat this so close to the previous location. > +This setting only works for targets that support asynchronous > +execution (@pxref{Background Execution}), for any other target the > +setting is treated as @code{unlimited}. And this is another unneeded repetition. > + add_setshow_uinteger_cmd ("direct-call-timeout", no_class, > + &direct_call_timeout, _("\ > +Set the timeout, for direct calls to inferior function calls."), _("\ > +Show the timeout, for direct calls to inferior function calls."), _("\ "direct calls to inferior function calls" sounds awkwardly. I guess you wanted to remove the second instance of "calls"? > + add_setshow_uinteger_cmd ("indirect-call-timeout", no_class, > + &indirect_call_timeout, _("\ > +Set the timeout, for indirect calls to inferior function calls."), _("\ > +Show the timeout, for indirect calls to inferior function calls."), _("\ Likewise here. Thanks.