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 25A5C3858D28 for ; Wed, 18 Jan 2023 17:29:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 25A5C3858D28 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 1pICG5-0000qJ-5s; Wed, 18 Jan 2023 12:29:57 -0500 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=lMzNdPw5ms359+X0iTYQAom2fUQDmLpA4Gl5GTRQRCo=; b=nkKRwVGgf02P IZS3Z/5PfdnWtLhyqGJoxvjlW+70E/FtwvH8kFRhCOghU1p8HBxwQpYkusS6C0uFObZgxoGQB09R3 LuT8hhX3sciyTEnV2mR00sxHBWQwVxQEigJc1pqG0UcZpTUtXyk/KpoCV7iDIq1NvhXh/U1LWzRrA 4c8p4MQvCoREPnRZHVbwP3i6hhxlOAoDC3Qfek4F+sLtUFveNrnC6WN91Ki2eGCRrpT7r2kdUduIx bevYWGdpUfml6AZyMLi/Z7ul2CDR3iWOWW1JvvZhOD7OiEXCIkhqaopzS4XfgH/5J8QU51ZVxcczV eW2j0owA6U6RwLEP0yV4+g==; 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> From: Eli Zaretskii 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-Spam-Status: No, score=-6.9 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: 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.