From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id H0NTOJWNcmnIUBAAWB0awg (envelope-from ) for ; Thu, 22 Jan 2026 15:50:29 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=R1ofZyU3; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C18B01E0E1; Thu, 22 Jan 2026 15:50:29 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 67BDE1E093 for ; Thu, 22 Jan 2026 15:50:27 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id DCAB64BC89A4 for ; Thu, 22 Jan 2026 20:50:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCAB64BC89A4 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=R1ofZyU3 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 87C4D4BA2E37 for ; Thu, 22 Jan 2026 20:49:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87C4D4BA2E37 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 87C4D4BA2E37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::236 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769114953; cv=none; b=kFXozE8NbntvrMJr44dFSUsiTdytpkj71IQhnagaSOfi3xL8k7w/5HQL1lEzX/EbFo2WQFfwPhUfKEid4JXuVdawI2uRPTI3TH17RoVmCwj6In1b9bJVc5O1K6ZedCUzacvei5gqZlVfnkWwDfxXYaW8azRrGXBZ0YAw+WRYfJ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769114953; c=relaxed/simple; bh=DBfGHrirUcw+DAgI9qt4sG7ZfOoOL1mADq8VG6rF/cI=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=CjBAb//q3r/y1peX3D7w2Yb+iXg62x4iKxUW0/1XXOWCMO+43Osz7xTismjjThVJK7qthIqOXy90zi/ZtnTl6CHlv1ck9L45gNGoOEnYzO++VFONyQF6xlslruPzgN3dRNyvZ31xqjWp5HaUXR7euED72BGAlIG55qRkDuSsMHc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87C4D4BA2E37 Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-45c86087949so477372b6e.2 for ; Thu, 22 Jan 2026 12:49:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1769114953; x=1769719753; darn=sourceware.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=bUmKSh9hmeLTmGHad8dRU2WfyB0l2ucOKEKJv/gDKRg=; b=R1ofZyU3fkNjW8TdeXlsGmFPrr2SDEs3ygpZ0L7TjlNthjE0J5fwQ7pLLGwaSssSxe CALo/gbrsUegySjQOpJN0hR4phBeIgGz4g4lNkcIwZOMsR8ZeO1IA4qv6yGTmjT1cas7 FIxjn6XNj6chO4tj5Eh28VOVew28trIfpnFhejLmOcjRy3Xpzug1G2c92OP2s01Wc2hN XEE2ZDazaVAxSCmgt7GNMk44UUr2IIjOBWgBDwdIU1Vmf+3g4gZRyjcsBR1pdsJOrIMx xiWYN+o3r9ZezphgJpji/FrYi/8/DX7S/2POy/Xw5pRaDmC0BUmEaLmnseGWgyGYwQet wlxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769114953; x=1769719753; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bUmKSh9hmeLTmGHad8dRU2WfyB0l2ucOKEKJv/gDKRg=; b=NpVXl5xBZTI2x1WlrE+M/qB9v/mLJBHPDqOyrgSdGTVjf8MVakPAGisKKJ1ahybov3 djBlMLptXHCrIqxb+mJ2T4YWNnYwWTr6xQ2pMfi8wirJSHXgyXizhv9jEXffUroQ0b0D Mkwmc+B9O108WlL+g3zLfaXY11OoWQFMHayTyXtGVymkWKwjcL4Zq2SPe2oIEmqcJPBV SaBazN7UerCmV0xaML0JbzJMXGRdR7CPw3SAssk47pzo7Uyr4g0ZXmOpvsX8H5h2nHOb wCa1YzP6uqC8SNXQEuZuoheCQ/hFWescXRIrfp1zg7b26GeR9dOpeathjWOhhYra3EfK tgvQ== X-Gm-Message-State: AOJu0YzEVPW70jWaiGOIUZDblERzpXj7PLKf204KT8837v9VfoY2CQ9e MYMlRCZHE0RLL9dU+8M+bzksEeWwIH/5coJJBjSV2IJHBqo6Lk6tPTfQx/N6hhGRqDQ9fASPMah 3of8= X-Gm-Gg: AZuq6aIE6fIiM1psvDSz6e+GIYKahszrruoOhXLJ6SZQgI/fy5ZqPdsnQG1humJ+eEU SSqVrwE9zDaW6H+LrbyJCCxYyte3siMTvkOpZux5eoKmVQw1JAjvWxDTjQ/kW+gWpAK3SQabEWH eOqnA+vqHwRVPl8aEA4VEc5lCrgnXGSxxwAevqQu1h5Y9s/oV8t/YxvOvYQyfQtl1ZlET6tL6n7 sk1jTZqIgtt5amGrIYuCAnoPRA6rDVPMwLuj85TLytyi30IBx/0IGSF5Z4ELOT3dzddN4OgKdVo pEXmbW0hrgTtcdEP3gUI/a/IkW/y2wXZbzvF3OqWO8rzXqTSAiZjEvDAqT5qmc0L72h+VeR/56E WOi1wc4LPA/2O/dv7O862XmfnMunYHQEVieWb4L0YkHfaVWbBdO5e1Phqe1qOKKxh4iRmuPZi7L hnzw3juagvJ4/bTUS1+aIdP/e1yOZnqkHvQ50PKrPyTq9ySVjimqlH X-Received: by 2002:a05:6820:8118:b0:662:c63e:9887 with SMTP id 006d021491bc7-662cabb2e87mr540064eaf.72.1769114952915; Thu, 22 Jan 2026 12:49:12 -0800 (PST) Received: from [192.168.0.26] (97-122-114-32.hlrn.qwest.net. [97.122.114.32]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-408afba74bfsm176755fac.13.2026.01.22.12.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jan 2026 12:49:12 -0800 (PST) From: Tom Tromey Subject: [PATCH 0/3] Remove some uses of alloca from cli/ Date: Thu, 22 Jan 2026 13:49:10 -0700 Message-Id: <20260122-command-no-alloca-v1-0-402aa429bbbf@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAEaNcmkC/x3MwQrCMAyA4VcZORtsqxPxVcRD1qZbYE0lFRHG3 t3q8Tv8/waNTbjBbdjA+C1Nqnb4wwBxIZ0ZJXVDcOHifAgYaymkCbUirWuNhDmcvcunNLrxCr1 7Gmf5/J/3R/dEjXEy0rj8TtVkFj0Wai822PcvK5uhWIMAAAA= X-Change-ID: 20260122-command-no-alloca-f2410f3d5058 To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.3 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org I found some spots in the CLI code that needlessly use alloca. This patch fixes these. Regression tested on x86-64 Fedora 41. Signed-off-by: Tom Tromey --- Tom Tromey (3): Use string_view in cli-decode.c:find_cmd Don't make copies when calling find_cmd Remove alloca from lookup_cmd gdb/cli/cli-decode.c | 50 +++++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 35 deletions(-) --- base-commit: 44ae137c1fcefe486639b7eab3f6a7f60e4659e5 change-id: 20260122-command-no-alloca-f2410f3d5058 Best regards, -- Tom Tromey