From patchwork Mon Apr 15 14:19:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 88491 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6ADFC3858C62 for ; Mon, 15 Apr 2024 14:20:07 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id A38883858D32 for ; Mon, 15 Apr 2024 14:19:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A38883858D32 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 A38883858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713190781; cv=none; b=dscSEVS0ache8MYqMeOOf/G18VcNTHfWJkotzWlg5iklG5PMeDUbr+UDPSCH/MiR67S9MEuUGnyp7vhtv+NxtuZsXPDZCHm0NTpzlxH94N6EHCVFV+WojNHFlD+Kxd9DT9pCatky0Ghk+ZlOK4KZ2uYx5uuYqfljmLb0GwR/mbw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713190781; c=relaxed/simple; bh=txuy2klL5LENHOlVAFAtGXqftSaiaNiJhs0vo7vYJGU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=w+sNVfcJvAZSIhJvl3QgJu7aSoZCm3G1vlSiSAm9A35Z7qDcMaK/tBgapZ+r415FLYKwJ/k3hz7uEVIh+dAeY7V/XKjvz//HXqtZshir3M9S6KtiynewA388YOdWwAGq1rCylh9EORsWWgcojodsCAK6zKTRyi5H5CSq48h4a2M= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713190776; 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=K9nSQhMv3gI4inVxbm3Jbh7g7aL3VcsQlsxzAEogU0E=; b=B1+fW7v+ffHGk9kJs7+o59VuLGLUDtmtZcAg+5x79MOJWXILnTecicJcMk2NLymJhCp1nO I6pViZrodPEvHkOEl6N3btJuQ8hpI2NEUemoyOctC6Fhz/rD23PhCS9DeCo/KezBBzJ/Wl FXpkb83YGWYhmLWfTM7oQQUMPm/Fe0s= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-695-uD5xUG7gN4GvqdTuGTY4XQ-1; Mon, 15 Apr 2024 10:19:34 -0400 X-MC-Unique: uD5xUG7gN4GvqdTuGTY4XQ-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-343cd240b2dso2200739f8f.2 for ; Mon, 15 Apr 2024 07:19:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713190772; x=1713795572; 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=K9nSQhMv3gI4inVxbm3Jbh7g7aL3VcsQlsxzAEogU0E=; b=xGXSWpyd5ditd0TwMTgByBM6nu34eX7aec/5G8+lomYUgtOrGZwOgOnaXASw8Jhzoc WyAFeCYqyOMJSytda5oXaEir9Ps3dnai0YgAbJygitnTAtOoI9vYOS9IJErXrWUj2LmD 8ez/V6s157+UYOL6zj1tXFIUXStwJTCNrQEo/mDASXDVaEBhHzoiwQgwCO2F2DIkhoqF y5yFbtR2gkGfTJDeCcL1/Zp+wEGdO3fxXrnk1MkMomvpPykTPutJxAMODAFWWJiX747g RF11ZKI1AD0/5G3ljqqTJ3EUQSzo/+EzLr3/DU8j35qRorefiQHFZSxHTH+2fXRhskGw AapA== X-Gm-Message-State: AOJu0Yxex/h9PNFpYoUHniDFBcgDZYa9hHo8BLsi9dg1QfMuPHCK9/pX jl9kCYp8Sg3fMoWrHCQjXn24VTo1kLGKTmMwdiCtlYrCLHHP3LV//40TNS4tlAfG6TV5nd4YEBP /+RtYST0ooqqlUm/d64QQ8cA0FxEEvGt1HV0Mxlndc6ElRhwwxFfJHG+sdJk6loF9pvuEINz/0E TfTPHFdjVmR6D+vlnoVANEoPYBGXN5mIeT16aAtMChkhI= X-Received: by 2002:adf:ef0a:0:b0:33e:7c9a:9368 with SMTP id e10-20020adfef0a000000b0033e7c9a9368mr5538026wro.63.1713190772315; Mon, 15 Apr 2024 07:19:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQSp4GPxBxmz9CwVftyFBWHDyHRVPhPBOfFt7GohIX3QZbLZL6NbaZOswnAMJd1/lKrZGeWA== X-Received: by 2002:adf:ef0a:0:b0:33e:7c9a:9368 with SMTP id e10-20020adfef0a000000b0033e7c9a9368mr5538008wro.63.1713190771736; Mon, 15 Apr 2024 07:19:31 -0700 (PDT) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id x13-20020a5d60cd000000b0033e7b05edf3sm12269478wrt.44.2024.04.15.07.19.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 07:19:31 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 1/3] gdb/record: remove unnecessary use of filename_completer Date: Mon, 15 Apr 2024 15:19:26 +0100 Message-Id: <754ab2b77ccc626c0d9684fced83bfd514a5b836.1713190701.git.aburgess@redhat.com> 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 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 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+patchwork=sourceware.org@sourceware.org Spotted that the 'record' command has its completer set to filename_completer. The problem is that 'record' is a prefix command, as such, its completer is hard-coded to complete on sub-commands. The attempt to use filename_completer is irrelevant. The 'record' command is itself a command though, that is, a user can do this: (gdb) record which is really just an alias for: (gdb) target record-full Nowhere does cmd_record_start (which is called when 'record' is used) expect a filename, and 'target record-full' doesn't expect a filename either. So lets just drop the line which sets filename_completer as the completer for 'record'. --- gdb/record.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/gdb/record.c b/gdb/record.c index 1843969c2c9..25a4c1e71b6 100644 --- a/gdb/record.c +++ b/gdb/record.c @@ -791,8 +791,6 @@ A size of \"unlimited\" means unlimited lines. The default is 10."), = add_prefix_cmd ("record", class_obscure, cmd_record_start, _("Start recording."), &record_cmdlist, 0, &cmdlist); - set_cmd_completer (record_cmd, filename_completer); - add_com_alias ("rec", record_cmd, class_obscure, 1); set_show_commands setshow_record_cmds