From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31480 invoked by alias); 2 Jun 2014 20:50:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 31470 invoked by uid 89); 2 Jun 2014 20:50:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: hera.aquilenet.fr Received: from hera.aquilenet.fr (HELO hera.aquilenet.fr) (141.255.128.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Jun 2014 20:50:42 +0000 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 96EF62B64; Mon, 2 Jun 2014 22:50:39 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xm6R8+JcxLdo; Mon, 2 Jun 2014 22:50:39 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 123BF270; Mon, 2 Jun 2014 22:50:38 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Doug Evans Cc: Eli Zaretskii , "gdb-patches\@sourceware.org" Subject: Re: [PATCH, doc RFA] Add guile gdb parameter support References: <87lhtnd2q9.fsf@gnu.org> <87vbsj3e6v.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 Prairial an 222 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Mon, 02 Jun 2014 20:50:00 -0000 In-Reply-To: (Doug Evans's message of "Mon, 2 Jun 2014 08:21:51 -0700") Message-ID: <87egz7hw82.fsf@gnu.org> User-Agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2014-06/txt/msg00045.txt.bz2 Doug Evans skribis: > On Mon, Jun 2, 2014 at 1:31 AM, Ludovic Court=C3=A8s wrote: [...] >>> +The argument @var{set-func} is a function of one argument: @var{self} = which I realized that #:set-proc (or even just #:set) would be more idiomatic. >>> +is the @code{} object representing the parameter. >>> +@value{GDBN} will call this function when a @var{parameter}'s value has >>> +been changed via the @code{set} API (for example, @kbd{set foo off}). >> >> It would be nicer if =E2=80=98set-func=E2=80=99 were passed both the par= ameter and the >> new value, such that it would be its responsibility to validate the >> value and set it, but it seems that that=E2=80=99s not how =E2=80=98cmd_= sfunc_ftype=E2=80=99 >> callbacks work. > > I know. > It's not my first choice either, but it's not clear to me that taking > on redesigning this part of gdb internals would be a useful > expenditure of time. Yeah, understood. >> Alternately, parameters could have just a =E2=80=9Cconversion=E2=80=9D f= unction, rather >> than a real =E2=80=98set=E2=80=99 function, just like SRFI-39 parameters= (info "(guile) >> Parameters"). That would free users from the need to explicitly call >> =E2=80=98set-parameter-value!=E2=80=99. >> >> Thoughts? > > I'm guessing by needing to call set-parameter-value! you mean in the > set-func to undo a bad setting. Exactly. > gdb parameters are the way they are, and python parameters must > indefinitely support the broken API. Then it sounds like keeping the API you propose is the right strategy, so let=E2=80=99s go for it. Thanks, Ludo=E2=80=99.