From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 3805A385771C for ; Wed, 6 Sep 2023 19:29:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3805A385771C Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com Received: from localhost.localdomain (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (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 ESMTPSA id BC6C91E0C2; Wed, 6 Sep 2023 15:29:17 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 2/2] gdb: remove interp_supports_command_editing Date: Wed, 6 Sep 2023 15:29:10 -0400 Message-ID: <20230906192916.210156-2-simon.marchi@efficios.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230906192916.210156-1-simon.marchi@efficios.com> References: <20230906192916.210156-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1173.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_SOFTFAIL,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: It is a trivial wrapper around the supports_command_editing method, remove it. Change-Id: I0fe3d7dc69601b3b89f82e055f7fe3d4af1becf7 --- gdb/event-top.c | 4 ++-- gdb/interps.c | 8 -------- gdb/interps.h | 4 ---- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/gdb/event-top.c b/gdb/event-top.c index 005ef4b7054d..d1be23bcbe9b 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -299,8 +299,8 @@ change_line_handler (int editing) /* Don't try enabling editing if the interpreter doesn't support it (e.g., MI). */ - if (!interp_supports_command_editing (top_level_interpreter ()) - || !interp_supports_command_editing (command_interp ())) + if (!top_level_interpreter ()->supports_command_editing () + || !command_interp ()->supports_command_editing ()) return; if (editing) diff --git a/gdb/interps.c b/gdb/interps.c index fa294dfa1a3d..adac98125239 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -262,14 +262,6 @@ command_interp (void) return current_ui->current_interpreter; } -/* See interp.h */ - -int -interp_supports_command_editing (struct interp *interp) -{ - return interp->supports_command_editing (); -} - /* interp_exec - This executes COMMAND_STR in the current interpreter. */ diff --git a/gdb/interps.h b/gdb/interps.h index 95a885d1b691..287df2c8c810 100644 --- a/gdb/interps.h +++ b/gdb/interps.h @@ -257,10 +257,6 @@ extern struct interp *command_interp (void); extern void clear_interpreter_hooks (void); -/* Returns true if INTERP supports using the readline library; false - if it uses GDB's own simplified form of readline. */ -extern int interp_supports_command_editing (struct interp *interp); - /* List the possible interpreters which could complete the given text. */ extern void interpreter_completer (struct cmd_list_element *ignore, -- 2.42.0