From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by sourceware.org (Postfix) with ESMTPS id F26053858414 for ; Fri, 10 Feb 2023 21:03:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F26053858414 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd35.google.com with SMTP id j17so2420278ioa.9 for ; Fri, 10 Feb 2023 13:03:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=dxH9qGlzEFym0p0xVVV7EVO8UPb2P/fqwb+gMAdsgIg=; b=RBo00ZTQ6dSfIeYxdPxfYVb+DOmp1qeHZ62K3gRNcMVr5rUc+0cenBr72CxeJPk6jL P2KErSU+0xaJEAt4VpS0JGPovoZpiPebqW3TP3ANz/VazVyCmuzwoQ0Y8t5t515+qh3S PRPW57bnd4zPJvX9+U2tEvqD9rhThnngW3uutdpmCT/7VYx2rHOoiMf6UBXiRyEUTPGI YpEHEJcr+TnyMaR4Cuxo5T/hFDOlGmGqpXwJnH9PBMSXx9jaKXii+yb/dMlbUN2xGGh9 saTaIROm0X0fAaFDpKWe7BURYDQoRLHdlNPkz5nCPFLZxygeU9AxZTiIfp2bSoIgNdCe chWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dxH9qGlzEFym0p0xVVV7EVO8UPb2P/fqwb+gMAdsgIg=; b=uOCmofzh9+wrGSDF0emDfuU/MoorC0bOeeggHg9LCPKN4BZkina0GgK4vHj6YlqrZW GJq/MdhXib7RXKwvy82lroSlTAxlHgIa7UmA8reOTDlTgb+jiOXdCI9p0UB+K6WQ3nhA 0qj6aPzzfEOMNMUIyhiaVZtceJ9zoK+GkPf9EJPHBB1KBaa4qbWAg2lmZZFSrONE326s LT8ocWwbpT9efry0xztSNH87VY1Xn2zHydeRvDkQyL2+5DnlOpqaxKxV9So2/Li1COUp xErprdSH0leHY/lmyv9+t8x+UPompSq3n2ry1MPy/FqcSp4m1J/efV3nZoXEPzTgep6J siHg== X-Gm-Message-State: AO0yUKWszSc0+xStY0iWi6XMqv4OHlQOc/Ij2PsOQ9uobbsyks2jIKO+ kB1ptvBRVlv466FOpmAR2fSD9w== X-Google-Smtp-Source: AK7set+l3ghdxujrMcig+RYx8l5XE4edKxY9TNn29f0w3y1VocCeK+6cVuIpwa40jZVMDIlYS2RsWg== X-Received: by 2002:a5d:9685:0:b0:718:8612:fc44 with SMTP id m5-20020a5d9685000000b007188612fc44mr11121160ion.15.1676063006104; Fri, 10 Feb 2023 13:03:26 -0800 (PST) Received: from murgatroyd (75-166-130-93.hlrn.qwest.net. [75.166.130.93]) by smtp.gmail.com with ESMTPSA id r17-20020a028811000000b003af4300d670sm1723886jai.27.2023.02.10.13.03.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Feb 2023 13:03:25 -0800 (PST) From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Ensure all DAP requests are keyword-only References: <20230210190039.2221954-1-tromey@adacore.com> <465ac384-7823-cc84-6e84-c34501db1071@simark.ca> X-Attribution: Tom Date: Fri, 10 Feb 2023 14:03:24 -0700 In-Reply-To: <465ac384-7823-cc84-6e84-c34501db1071@simark.ca> (Simon Marchi's message of "Fri, 10 Feb 2023 15:57:58 -0500") Message-ID: <877cwpxmg3.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: >>>>> "Simon" == Simon Marchi writes: >> -def set_breakpoint(source, *, breakpoints=[], **args): >> +def set_breakpoint(*, source, breakpoints=[], **args): >> if "path" not in source: >> result = [] >> else: Simon> IIUC , this function is called magically when receiving a setBreakpoints Simon> request, and "source" comes from the request arguments? Yes, that's right. server.py does: body = _commands[params["command"]](**args) Now, in theory it's possible to just call functions like this directly from some other python code. However, I think we should generally prohibit this, and if it's needed, refactor to have some helper function, to avoid combining protocol-layer code with implementation code. Simon> If so, the change makes sense to me, as there are no positional Simon> arguments in DAP requests. Thanks, I'm going to check it in. Tom