From: Simon Marchi <simon.marchi@efficios.com>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 2/2] gdb: remove interp_supports_command_editing
Date: Wed, 6 Sep 2023 15:29:10 -0400 [thread overview]
Message-ID: <20230906192916.210156-2-simon.marchi@efficios.com> (raw)
In-Reply-To: <20230906192916.210156-1-simon.marchi@efficios.com>
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
next prev parent reply other threads:[~2023-09-06 19:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 19:29 [PATCH 1/2] gdb: remove interp_pre_command_loop Simon Marchi
2023-09-06 19:29 ` Simon Marchi [this message]
2023-09-07 18:03 ` [PATCH 2/2] gdb: remove interp_supports_command_editing Tom Tromey
2023-09-07 18:03 ` [PATCH 1/2] gdb: remove interp_pre_command_loop Tom Tromey
2023-09-08 1:56 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230906192916.210156-2-simon.marchi@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).