From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EJdGDflpYGb7RScAWB0awg (envelope-from ) for ; Wed, 05 Jun 2024 09:36:57 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BRsbrpJe; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 322AF1E0C0; Wed, 5 Jun 2024 09:36:57 -0400 (EDT) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 1E0D91E092 for ; Wed, 5 Jun 2024 09:36:55 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BF49B3938277 for ; Wed, 5 Jun 2024 13:36:54 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 3AB79393827C for ; Wed, 5 Jun 2024 13:36:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3AB79393827C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3AB79393827C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717594576; cv=none; b=lQVNug0p8Oz5V3rXrjUegEoZumsFsQZB5cEBYHfGYiS5h1osaXPF6vn8S09AZ3cDgQxL7C4l1mBJi4jAbpd4YtTASc9zVpEPRLUHgD+IODGuylk1l3yIould8mD+vY8s2xrd0t+JEQPZzmKxiqBjWJRcj6dof2p/6Fhn3Dls3ys= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717594576; c=relaxed/simple; bh=cesqD2rff2bxr31/TCt+ZPdAiY8O0P7oXdtGZCm0Xfo=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=UwTyUU1AstzLtXKPlb3zQRi0Apq1AX/ln0bs+c7X6YnIGVRFB5KQBfzzCxiM+FgSJPho+qv9F7ZGnTiBYL0JyUehXnLlLFr/EZounapx/hW1wnoPpB8fEd7KYdHopWhOPBjUNeXIo2j3/mNnjanwFGtaoB7+/zFVqA0IXotQ/aU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717594574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gXDL+tRnA+YNxW5CHfoQtK/x1ZHFrPu+1Ln7BK944vY=; b=BRsbrpJeUCpX6QfKKsaY0TfimhjnH/ix4ELKERUxq/E7etACiHeyUgNhLt3QksiYfuS+78 5i4E+srRSQUduOcHYvi1OdjqXjSFqrMY62wdSSDJSEGhd5hWgmXo0Nz9lZFmBgQF5Pr2YI wWadV0Z9ZAJP2stExgJJNErtvBJuudw= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-186-SojyooZ3Od-uC3i6O7nZdQ-1; Wed, 05 Jun 2024 09:36:13 -0400 X-MC-Unique: SojyooZ3Od-uC3i6O7nZdQ-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42153125d3eso13388975e9.2 for ; Wed, 05 Jun 2024 06:36:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717594570; x=1718199370; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gXDL+tRnA+YNxW5CHfoQtK/x1ZHFrPu+1Ln7BK944vY=; b=lCC0O3ZV96/NOOea+xEIIs7eBIm/ASBFOcTjBSnJ02q2CDRpVzaqBLyNAswm40A8oe 4QXKKhDHlenbMYNtGF2MAOJC2r81eY3WT98BaYqisX81gMw7SBKKElL3c4j8v3g3FNDU gAnPXEDX+JfKSAJ6IUTkvAWi1LRbpilahiO/TQSaWGRlbVDcaETijM3+xt3WF+zMbdLD V1l4fvpNObYC+jwcOhsiOdGJQSaVryG4p+jq/W6djh0SylFRj92afvRaowIxmTPDrRYw B+2eDvvtqSt4R1voNMwlBfImXeXV7X8k87AOwTmslpIY3OqHKCyVhLP4Ke5WpQDr+Tfv UmEQ== X-Gm-Message-State: AOJu0YwpPH0BM/s3Tw3hpUh7/QSYvWjftrShBmgysfswg8x6a8y4MJal CmFeplWuqcz9WE/bsOeuyycu4VURkDtMFGyg/lKGfd6l9sRxzkkO24LaxSmxN92eDGj5eqHGoMs 5ISvzpK5FeklKSZ3KksCAhO90X8RtPl6iycLawtPT1614/xYGIHAyYmlGPlUHyXoeCpKcg60XEV I985hbiSGBjDY4m2n9MaAB1JDCAYu6cCTkovBh76IrITs= X-Received: by 2002:a05:600c:5491:b0:420:1551:96a9 with SMTP id 5b1f17b1804b1-4215633a321mr20009535e9.39.1717594570389; Wed, 05 Jun 2024 06:36:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHk7dKh4WPBrHqWiqFBq7kiuJDlTZ1d9fYjSVXspFyjgb+8StmyZ597weXN+PaPkoAwhkFpmg== X-Received: by 2002:a05:600c:5491:b0:420:1551:96a9 with SMTP id 5b1f17b1804b1-4215633a321mr20009325e9.39.1717594569782; Wed, 05 Jun 2024 06:36:09 -0700 (PDT) Received: from localhost ([31.111.84.186]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215813f60esm22078805e9.47.2024.06.05.06.36.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:36:09 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv3 0/7] Further filename completion improvements Date: Wed, 5 Jun 2024 14:36:00 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 In V3: - Patch #1 from the v2 series was merged. - Remaining patches have been rebased and retested. In V2: - Patches #1 and #2 are new in this iteration. Patches #3 to #8 are the patches from V1 rebased onto these two new patches, - Patch #1 adds documentation for the formatting of filename arguments, this tries to explain the two diffent ways that GDB expects filename arguments to be formatted. - Patch #2 addresses the problem that Lancelot pointed out: some commands don't expect filename arguments to be quoted, or to contain escapes. In this patch I split the filename completion in two so the two different filename argument formats are handled separately... - This clears the way for the rest of the series, which updates how completion works for those filename arguments that do accept quoting and escaping, - Patches #3 to #8 are in principle the same as in V1, but there were some changes after rebasing onto the new patch #2. --- Andrew Burgess (7): gdb: split apart two different types of filename completion gdb: improve escaping when completing filenames gdb: move display of completion results into completion_result class gdb: simplify completion_result::print_matches gdb: add match formatter mechanism for 'complete' command output gdb: apply escaping to filenames in 'complete' results gdb: improve gdb_rl_find_completion_word for quoted words gdb/auto-load.c | 4 +- gdb/breakpoint.c | 5 +- gdb/cli/cli-cmds.c | 34 +- gdb/cli/cli-decode.c | 12 +- gdb/cli/cli-dump.c | 6 +- gdb/compile/compile.c | 3 +- gdb/completer.c | 501 +++++++++++++++--- gdb/completer.h | 79 ++- gdb/corefile.c | 4 +- gdb/corelow.c | 4 +- gdb/dwarf2/index-write.c | 3 +- gdb/exec.c | 7 +- gdb/guile/scm-cmd.c | 2 +- gdb/infcmd.c | 15 +- gdb/inferior.c | 2 +- gdb/jit.c | 2 +- gdb/python/py-cmd.c | 2 +- gdb/record-full.c | 5 +- gdb/record.c | 2 +- gdb/skip.c | 2 +- gdb/source.c | 3 +- gdb/symfile.c | 7 +- gdb/target-descriptions.c | 7 +- gdb/target.c | 4 +- gdb/target.h | 9 +- .../gdb.base/filename-completion.exp | 257 +++++++-- gdb/tracectf.c | 3 +- gdb/tracefile-tfile.c | 4 +- 28 files changed, 791 insertions(+), 197 deletions(-) base-commit: 2db414c36b4f030782c2c8a24c916c3033261af0 -- 2.25.4